Procházet zdrojové kódy

Remove unnecessary condition

Jordi Boggiano před 5 roky
rodič
revize
80644c65ed
1 změnil soubory, kde provedl 7 přidání a 9 odebrání
  1. 7 9
      src/Monolog/Logger.php

+ 7 - 9
src/Monolog/Logger.php

@@ -319,16 +319,14 @@ class Logger implements LoggerInterface, ResettableInterface
             }
 
             // once the record exist, send it to all handlers as long as the bubbling chain is not interrupted
-            if (null !== $record) {
-                try {
-                    if (true === $handler->handle($record)) {
-                        break;
-                    }
-                } catch (Throwable $e) {
-                    $this->handleException($e, $record);
-
-                    return true;
+            try {
+                if (true === $handler->handle($record)) {
+                    break;
                 }
+            } catch (Throwable $e) {
+                $this->handleException($e, $record);
+
+                return true;
             }
         }