Solved

Non-abstract Method must contain body

Posted on 2009-04-07
3
1,987 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

803 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