Solved

Non-abstract Method must contain body

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now