Revert "Move to Warning an alert on hook when method return a string than a int"

This reverts commit cc5727bc7b.
This commit is contained in:
Alexandre SPANGARO 2019-04-17 07:27:38 +02:00
parent 660a1cea1d
commit 3091288ed7

View File

@ -275,7 +275,7 @@ class HookManager
// TODO dead code to remove (do not enable this, but fix hook instead): result must not be a string but an int. you must use $actionclassinstance->resprints to return a string
if (! is_array($resaction) && ! is_numeric($resaction))
{
dol_syslog('Warning: Bug into hook '.$method.' of module class '.get_class($actionclassinstance).'. Method must not return a string but an int (0=OK, 1=Replace, -1=KO) and set string into ->resprints', LOG_WARNING);
dol_syslog('Error: Bug into hook '.$method.' of module class '.get_class($actionclassinstance).'. Method must not return a string but an int (0=OK, 1=Replace, -1=KO) and set string into ->resprints', LOG_ERR);
if (empty($actionclassinstance->resprints)) { $this->resPrint.=$resaction; $resaction=0; }
}
}