[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-dev] actioncomm class : Question on error $this fordiden not i

From: Florian Henry
Subject: [Dolibarr-dev] actioncomm class : Question on error $this fordiden not in object context
Date: Mon, 07 Jan 2013 15:02:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Happy new year every body !

In class /htdocs/comm/action/actioncomm.class.php, i found something that I don't know how to solve.

In Branch 3.3 and Dev (may be older, I didn't check), the static method getActions (line 546) we have that $this->error=$db->lasterror(); (line 584) if the SQL is bad. This is a normal SQL error statement, but as the method is static I got this error.

Fatal error: Using $this when not in object context in /home/bobby/Eclipse/workspace/dolibarr/htdocs/comm/action/class/actioncomm.class.php on line 584

I know where is the error, it's in my SQL filter statement, but this mail is more to ask "What is the correct way in dolibarr to affect error on this non-object in static method?"

I call it into pages with this instruction : ActionComm::getActions($db,$user->societe_id,0,'','bala');

Kind regards

Florian HENRY
+33 6 03 76 48 07

reply via email to

[Prev in Thread] Current Thread [Next in Thread]