summaryrefslogtreecommitdiffstats
path: root/lib/private/Log
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-07-23 16:30:38 +0200
committerJoas Schilling <coding@schilljs.com>2018-07-23 16:30:38 +0200
commitb788f0a456d7c71d1270f8cf0288e8bb71fe8fcc (patch)
treef3717e554a68d8c45cfe5ada39e98338b6cdf815 /lib/private/Log
parent6b440cc36558246b9651344872013aa9de21f86e (diff)
downloadnextcloud-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.php3
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);
}
}