diff options
author | Joas Schilling <coding@schilljs.com> | 2018-07-23 16:30:38 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-07-23 16:30:38 +0200 |
commit | b788f0a456d7c71d1270f8cf0288e8bb71fe8fcc (patch) | |
tree | f3717e554a68d8c45cfe5ada39e98338b6cdf815 /lib/private/Log | |
parent | 6b440cc36558246b9651344872013aa9de21f86e (diff) | |
download | nextcloud-server-b788f0a456d7c71d1270f8cf0288e8bb71fe8fcc.tar.gz nextcloud-server-b788f0a456d7c71d1270f8cf0288e8bb71fe8fcc.zip |
Make sure error_log() always receives a string
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Log')
-rw-r--r-- | lib/private/Log/File.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php index 597cb54e402..c881c6dd9de 100644 --- a/lib/private/Log/File.php +++ b/lib/private/Log/File.php @@ -145,6 +145,9 @@ class File implements IWriter, IFileBased { error_log($entry); } if (php_sapi_name() === 'cli-server') { + if (!\is_string($message)) { + $message = json_encode($message); + } error_log($message, 4); } } |