Skip to content
Snippets Groups Projects
Commit a57b7d4e authored by Raphaël Doursenaud's avatar Raphaël Doursenaud
Browse files

Qual: Derived missing variable from a known one

parent 7852020b
No related branches found
No related tags found
No related merge requests found
......@@ -112,7 +112,7 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
/**
* Output log content
*
* @param string $content Content to log
* @param array $content Content to log
* @return void
*/
public function export($content)
......@@ -133,14 +133,14 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
include_once 'ChromePhp.class.php';
set_include_path($oldinclude);
ob_start(); // To be sure headers are not flushed until all page is completely processed
if ($level == LOG_ERR) ChromePhp::error($message);
elseif ($level == LOG_WARNING) ChromePhp::warn($message);
elseif ($level == LOG_INFO) ChromePhp::log($message);
else ChromePhp::log($message);
if ($content['level'] == LOG_ERR) ChromePhp::error($content['message']);
elseif ($content['level'] == LOG_WARNING) ChromePhp::warn($content['message']);
elseif ($content['level'] == LOG_INFO) ChromePhp::log($content['message']);
else ChromePhp::log($content['message']);
}
catch (Exception $e)
{
// Do not use dol_syslog here to avoid infinite loop
}
}
}
\ No newline at end of file
}
......@@ -110,7 +110,7 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
/**
* Output log content
*
* @param string $content Content to log
* @param array $content Content to log
* @return void
*/
public function export($content)
......@@ -132,10 +132,10 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
set_include_path($oldinclude);
ob_start(); // To be sure headers are not flushed until all page is completely processed
$firephp = FirePHP::getInstance(true);
if ($level == LOG_ERR) $firephp->error($message);
elseif ($level == LOG_WARNING) $firephp->warn($message);
elseif ($level == LOG_INFO) $firephp->log($message);
else $firephp->log($message);
if ($content['level'] == LOG_ERR) $firephp->error($content['message']);
elseif ($content['level'] == LOG_WARNING) $firephp->warn($content['message']);
elseif ($content['level'] == LOG_INFO) $firephp->log($content['message']);
else $firephp->log($content['message']);
}
catch (Exception $e)
{
......@@ -143,4 +143,4 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
return false;
}
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment