Fix: Add warning if trigger was called with wrong parameters

This commit is contained in:
Laurent Destailleur 2009-08-10 17:46:47 +00:00
parent 766cb6cf64
commit 66c1406bbb
2 changed files with 7 additions and 1 deletions

View File

@ -3043,7 +3043,7 @@ class FactureLigne
*/
function update()
{
global $conf;
global $user,$langs,$conf;
// Clean parameters
$this->desc=trim($this->desc);

View File

@ -57,6 +57,12 @@ class Interfaces
*/
function run_triggers($action,$object,$user,$langs,$conf)
{
// Check parameters
if (! is_object($object) || ! is_object($user) || ! is_object($langs) || ! is_object($conf))
{
dol_syslog('interface::run_triggers was called with wrong parameters object='.is_object($object).' user='.is_object($user).' langs='.is_object($langs).' conf='.is_object($conf), LOG_WARNING);
}
$handle=opendir($this->dir);
$modules = array();
$nbfile = $nbtotal = $nbok = $nbko = 0;