Solved

Non-abstract Method must contain body

Posted on 2009-04-07
3
2,030 Views
Last Modified: 2013-11-10
Hello,

Im receiving a PHP error - Note I am using the code igniter frame work.

Non-abstract method Dealer_model::on_screen() must contain body in W:\www\s\system\application\models\dealer_model.php on line 84

I cant figure out what body is for this non-abstract method; please see method below.

Thank you

#--------------------------------------------------------------------------
# METHOD: On-screen display of array contents
#--------------------------------------------------------------------------
    function on_screen($var);
    {
        // on-screen display
        print ('<xmp>');
        print_r($var);
        print ('</xmp>');
        return;
    }

Open in new window

0
Comment
Question by:vrmetro
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
twocandles earned 500 total points
ID: 24090018
You have an extra ';' after the function definition, and php is assuming it's an abstract method. Just remove it.
0
 

Author Closing Comment

by:vrmetro
ID: 31567632
Nice!  Thanks
0
 
LVL 6

Expert Comment

by:twocandles
ID: 24094734
Glad to help and thanks for the points! :)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I make this form submit to itself? 10 35
Split wordpress loop 35 56
Custom Wordpress Loop 22 38
Why is PHP Storm giving me an undefined constant error? 4 19
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question