mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-23 00:43:48 +01:00
LSlog : fix handling non-string message
This commit is contained in:
parent
7f1fa41e3a
commit
f32fb31d6e
1 changed files with 7 additions and 0 deletions
|
@ -141,6 +141,13 @@ class LSlog {
|
|||
if (!array_key_exists($level, self :: $levels))
|
||||
$level = self :: $default_level;
|
||||
|
||||
// Handle non-string message
|
||||
if (!is_string($message)) {
|
||||
if (is_object($message) && method_exists($message, '__toString'))
|
||||
$message = strval($message);
|
||||
else
|
||||
$message = varDump($message);
|
||||
}
|
||||
|
||||
// Add prefix
|
||||
if (php_sapi_name() == "cli") {
|
||||
|
|
Loading…
Reference in a new issue