git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eaeefaf
)
Fix: fatal hhvm error when outputting log messages in us-ascii charset
author
gggeek
<giunta.gaetano@gmail.com>
Tue, 14 Apr 2015 22:04:27 +0000
(23:04 +0100)
committer
gggeek
<giunta.gaetano@gmail.com>
Tue, 14 Apr 2015 22:04:27 +0000
(23:04 +0100)
src/Helper/Logger.php
patch
|
blob
|
history
diff --git
a/src/Helper/Logger.php
b/src/Helper/Logger.php
index
62f7d75
..
bf86aba
100644
(file)
--- a/
src/Helper/Logger.php
+++ b/
src/Helper/Logger.php
@@
-37,6
+37,11
@@
class Logger
*/
public function debugMessage($message, $encoding=null)
{
+ // US-ASCII is a warning for PHP and a fatal for HHVM
+ if ($encoding == 'US-ASCII') {
+ $encoding = 'UTF-8';
+ }
+
if (PHP_SAPI != 'cli') {
$flags = ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE;
if ($encoding != null) {