Make sure all error messages have the method name
[plcapi.git] / src / Helper / Logger.php
index 62f7d75..77e0e14 100644 (file)
@@ -1,14 +1,7 @@
 <?php
-/**
- * Created by PhpStorm.
- * User: gg
- * Date: 12/04/2015
- * Time: 12:11
- */
 
 namespace PhpXmlRpc\Helper;
 
-
 class Logger
 {
     protected static $instance = null;
@@ -37,6 +30,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) {
@@ -51,4 +49,4 @@ class Logger
         // let the user see this now in case there's a time out later...
         flush();
     }
-}
\ No newline at end of file
+}