forked from Wavyzz/dolibarr
Merge pull request #9131 from fappels/7.0_Fix_syslog_infinite_loop
Fix chromephp firephp Syslog infinite loop
This commit is contained in:
@@ -121,13 +121,14 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
|
||||
|
||||
if (! file_exists($conf->global->SYSLOG_CHROMEPHP_INCLUDEPATH.'/ChromePhp.php') && ! file_exists($conf->global->SYSLOG_CHROMEPHP_INCLUDEPATH.'/ChromePhp.class.php'))
|
||||
{
|
||||
$conf->global->MAIN_SYSLOG_DISABLE_CHROMEPHP = 1; // avoid infinite loop
|
||||
if (is_object($langs)) // $langs may not be defined yet.
|
||||
{
|
||||
$errors[] = $langs->trans("ErrorFailedToOpenFile", 'ChromePhp.class.php or ChromePhp.php');
|
||||
$errors[] = $langs->trans("ErrorFailedToOpenFile", 'ChromePhp.class.php or ChromePhp.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
$errors[] = "ErrorFailedToOpenFile ChromePhp.class.php or ChromePhp.php";
|
||||
$errors[] = "ErrorFailedToOpenFile ChromePhp.class.php or ChromePhp.php";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,15 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
|
||||
|
||||
if (!file_exists($conf->global->SYSLOG_FIREPHP_INCLUDEPATH . self::$firephp_class_path))
|
||||
{
|
||||
$errors[] = $langs->trans("ErrorFailedToOpenFile", self::$firephp_class_path);
|
||||
$conf->global->MAIN_SYSLOG_DISABLE_FIREPHP = 1; // avoid infinite loop
|
||||
if (is_object($langs)) // $langs may not be defined yet.
|
||||
{
|
||||
$errors[] = $langs->trans("ErrorFailedToOpenFile", self::$firephp_class_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
$errors[] = "ErrorFailedToOpenFile " . self::$firephp_class_path;
|
||||
}
|
||||
}
|
||||
|
||||
return $errors;
|
||||
|
||||
Reference in New Issue
Block a user