From b8e73966f2a4f394ac7ab641d6fbc599b6955161 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Nov 2011 02:31:33 +0100 Subject: [PATCH] Fix: Usage of FirePHP does not erase set_include_path done --- htdocs/core/lib/functions.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 446e6c315c1..f5164cfd689 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -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);