Merge pull request #10760 from nextcloud/backport/10355/make-sure-error-log-always-receives-a-string

[stable13] Make sure error_log() always receives a string
This commit is contained in:
Morris Jobke 2018-08-20 15:12:16 +02:00 committed by GitHub
commit 74618d1011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}
}