Fatal error $this->

HOW TO FIX

Fatal error: Uncaught Error: Using $this when not in object context in /testynarkotykowe/libs/timer/index.php:13 Stack trace: #0 /testynarkotykowe/index.php(36): TIMER::getTime(‘all’) #1 /testynarkotykowe/m/pg/index.php(110): PAGE->PAGE(NULL, ‘cart’) #2 /testynarkotykowe/index.php(28): include_once(‘/testynarkotyko…’) #3 /testynarkotykowe/index.php(115): loadMod(‘pg’) #4 {main} thrown in /testynarkotykowe/libs/timer/index.php on line 13

HOW TO TRACK THE ERROR? http://testynarkotykowe.j13x.pl/index.txt
HOW TO FIX THE CODE

If you post the code, someone will have a look to see why the error might be happening. Try to narrow it down to the minimum code needed to duplicate the issue, and surround it with three backticks on a separate line, top and bottom, to format it properly.

I would first of all trace and remove this error:

Deprecated: Non-static method TIMER::getTime() should not be called statically in /testynarkotykowe/index.php on line 36

I would also remove the error suppression @ in the following and see if errors are raised:

function PAGE($md='',$md2='',$md3='',$md4='') 
{
  global $db,$md;
  loadLib('timer'); 
  @TIMER::setTimer('all'); 

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.