Browse Source

Also adjust logging similar to BaseErrorHandler.

dereuromark 8 years ago
parent
commit
4951149d2f
1 changed files with 7 additions and 4 deletions
  1. 7 4
      src/Error/Middleware/ErrorHandlerMiddleware.php

+ 7 - 4
src/Error/Middleware/ErrorHandlerMiddleware.php

@@ -191,10 +191,13 @@ class ErrorHandlerMiddleware
             return;
         }
 
-        $skipLog = $this->getConfig('skipLog');
-        if ($skipLog) {
-            foreach ((array)$skipLog as $class) {
-                if ($exception instanceof $class) {
+        $unwrapped = $exception instanceof PHP7ErrorException ?
+            $exception->getError() :
+            $exception;
+
+        if ($this->getConfig('skipLog')) {
+            foreach ((array)$this->getConfig('skipLog') as $class) {
+                if ($unwrapped instanceof $class) {
                     return;
                 }
             }