Do not use STDOUT and STDERR constants master github/master
authorChristian Weiske <cweiske@cweiske.de>
Fri, 21 Apr 2023 19:40:20 +0000 (21:40 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 21 Apr 2023 19:40:20 +0000 (21:40 +0200)
.. they do not exist in webserver context

src/phinde/Log.php

index 36a126b5f5f71a36a88cb98ec5f17472eb5e143b..7ae0d82ebc70324e2bd3b272b514ecea8619a3f8 100644 (file)
@@ -5,7 +5,7 @@ class Log
 {
     public static function error($msg)
     {
-        static::log($msg, STDERR);
+        static::log($msg, 'php://stderr');
     }
 
     public static function info($msg)
@@ -15,7 +15,7 @@ class Log
         }
     }
 
-    public static function log($msg, $stream = STDOUT)
+    public static function log($msg, $stream = 'php://stdout')
     {
         if (isset($GLOBALS['phinde']['logfile'])
             && $GLOBALS['phinde']['logfile'] != ''