Преглед на файлове

Fix Core\ErrorHandler

For errors in the engine config file.
Visman преди 3 години
родител
ревизия
c0be6d857d
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      app/Core/ErrorHandler.php

+ 4 - 1
app/Core/ErrorHandler.php

@@ -168,7 +168,10 @@ class ErrorHandler
         $useErrLog = true;
 
         try {
-            if (! $this->c->Log instanceof NullLogger) {
+            if (
+                $this->c instanceof Container
+                && ! $this->c->Log instanceof NullLogger
+            ) {
                 $context = [];
                 $method  = $this->type[$error['type']][1] ?? $this->type[0][1];