From 276135c0fe773e87412f6a53d3b3254e775d507e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 2 Mar 2018 12:22:42 +0200 Subject: [PATCH] ErrorLogHandler: use strict comparison otherwise `null` and `false` get accepted as valid types --- src/Monolog/Handler/ErrorLogHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Monolog/Handler/ErrorLogHandler.php b/src/Monolog/Handler/ErrorLogHandler.php index 2c801398..c5f888d0 100644 --- a/src/Monolog/Handler/ErrorLogHandler.php +++ b/src/Monolog/Handler/ErrorLogHandler.php @@ -38,7 +38,7 @@ class ErrorLogHandler extends AbstractProcessingHandler { parent::__construct($level, $bubble); - if (false === in_array($messageType, self::getAvailableTypes())) { + if (false === in_array($messageType, self::getAvailableTypes(), true)) { $message = sprintf('The given message type "%s" is not supported', print_r($messageType, true)); throw new \InvalidArgumentException($message); }