From fad3e427c78266abf428c76b11e50ee9f537fb7f Mon Sep 17 00:00:00 2001 From: Koen Eelen Date: Tue, 18 Aug 2020 16:32:06 +0200 Subject: [PATCH] Made the check in substr() strict compare to NULL --- src/Monolog/Utils.php | 2 +- test.php | 0 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 test.php diff --git a/src/Monolog/Utils.php b/src/Monolog/Utils.php index 7515eadb..5299d441 100644 --- a/src/Monolog/Utils.php +++ b/src/Monolog/Utils.php @@ -31,7 +31,7 @@ final class Utils return mb_strcut($string, $start, $length); } - return substr($string, $start, $length ?: strlen($string)); + return substr($string, $start, (null === $length) ? strlen($string) : $length); } /** diff --git a/test.php b/test.php deleted file mode 100644 index e69de29b..00000000