Make sure error_log() always receives a string

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/10355/head
Joas Schilling 8 years ago
parent 6b440cc365
commit b788f0a456
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
  1. 3
      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);
}
}

Loading…
Cancel
Save