Solved

Non-abstract Method must contain body

Posted on 2009-04-07
3
1,949 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 Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
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…
The viewer will learn how to count occurrences of each item in an array.

867 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

22 Experts available now in Live!

Get 1:1 Help Now