Fix: Usage of FirePHP does not erase set_include_path done

This commit is contained in:
Laurent Destailleur 2011-11-01 02:31:33 +01:00
parent dfcc0cff0c
commit b8e73966f2

View File

@ -491,9 +491,10 @@ function dol_syslog($message, $level=LOG_INFO)
{
// Warning FirePHPCore must be into PHP include path. It is not possible to use into require_once() a constant from
// database or config file because we must be able to log data before database or config file read.
$oldinclude=get_include_path();
set_include_path('/usr/share/php/');
require_once('FirePHPCore/FirePHP.class.php');
restore_include_path();
set_include_path($oldinclude);
ob_start();
$firephp = FirePHP::getInstance(true);
if ($level == LOG_ERR) $firephp->error($message);