diff options
author | Joas Schilling <coding@schilljs.com> | 2018-07-23 16:30:38 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-08-20 14:12:08 +0200 |
commit | 60ced31116912aae42b76a7c0031158532c97098 (patch) | |
tree | 337517ca62087313f041d37f6c654aee0ab287a2 | |
parent | f2f723c7c83798ccb65967b7329dd5b7ec78ea78 (diff) | |
download | nextcloud-server-60ced31116912aae42b76a7c0031158532c97098.tar.gz nextcloud-server-60ced31116912aae42b76a7c0031158532c97098.zip |
Make sure error_log() always receives a string
Signed-off-by: Joas Schilling <coding@schilljs.com>
-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 b6a208ad68a..94f4f6b2e8a 100644 --- a/lib/private/Log/File.php +++ b/lib/private/Log/File.php @@ -144,6 +144,9 @@ class File { error_log($entry); } if (php_sapi_name() === 'cli-server') { + if (!\is_string($message)) { + $message = json_encode($message); + } error_log($message, 4); } } |