• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2444
  • Last Modified:

Non-abstract Method must contain body

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
vrmetro
Asked:
vrmetro
  • 2
1 Solution
 
twocandlesCommented:
You have an extra ';' after the function definition, and php is assuming it's an abstract method. Just remove it.
0
 
vrmetroAuthor Commented:
Nice!  Thanks
0
 
twocandlesCommented:
Glad to help and thanks for the points! :)
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now