Ajout code pour compatibilité PHP 5.2
This commit is contained in:
parent
0bdc1eabe1
commit
e0486dc4a7
@ -682,4 +682,27 @@ function llxFooter($foot='',$limitIEbug=1)
|
|||||||
print "</body>\n";
|
print "</body>\n";
|
||||||
print "</html>\n";
|
print "</html>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************
|
||||||
|
* Error handler for PHP 5.2
|
||||||
|
* This make Dolibarr working in PHP 5.2+ when some code do print "$object" and $object is an object.
|
||||||
|
*/
|
||||||
|
/****************************************************************
|
||||||
|
function compatibilityErrorHandler($errno, $errstr, $errfile, $errline)
|
||||||
|
{
|
||||||
|
switch ($errno) {
|
||||||
|
case E_RECOVERABLE_ERROR:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
echo "Unknown error type: [$errno] $errstr<br />\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (defined("E_RECOVERABLE_ERROR")) // set to the user defined error handler
|
||||||
|
{
|
||||||
|
$old_error_handler = set_error_handler("compatibilityErrorHandler",E_RECOVERABLE_ERROR);
|
||||||
|
}
|
||||||
|
****************************************************************/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user