Selaa lähdekoodia

fix TypeError for php8

walkor 5 vuotta sitten
vanhempi
commit
c8369ed141
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 6 2
      Worker.php

+ 6 - 2
Worker.php

@@ -1250,8 +1250,12 @@ class Worker
         if ($handle) {
             unset($handle);
             \set_error_handler(function(){});
-            \fclose($STDOUT);
-            \fclose($STDERR);
+            if ($STDOUT) {
+                \fclose($STDOUT);
+            }
+            if ($STDERR) {
+                \fclose($STDERR);
+            }
             \fclose(\STDOUT);
             \fclose(\STDERR);
             $STDOUT = \fopen(static::$stdoutFile, "a");