Welcome Guest, Not a member yet? Register   Sign In
Non-Abstract Method must contain body?
#1

[eluser]RJ[/eluser]
Hello,

I'm receiving a PHP error:
Quote:Non-abstract method Dealer_model::on_screen() must contain body in W:\www\s\system\application\models\dealer_model.php on line 84

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

I've combed the user guide plus forum, read an article on abstraction to better understand; can't figure out what "body" is for this non-abstract method.

Thank you
#2

[eluser]RJ[/eluser]
Figured it out, had to remove the ";" after
Code:
function on_screen($var)
#3

[eluser]jedd[/eluser]
It looks like the problem is actually on line 83.

(Why do people post 'error in line #' messages without identifying line x?)

Anyway - try removing the ; from the end of the function definition line - your life will be easier.
#4

[eluser]RJ[/eluser]
Good catch, I usually do include specific line or indicate, thanks.




Theme © iAndrew 2016 - Forum software by © MyBB