From ed27143e940bdd324e1d1d9d03522591b0b0fce1 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Mon, 27 Jan 2025 09:43:29 +0100 Subject: [PATCH] [CLEANUP] Avoid using `empty` on an integer `empty` behaves in mysterious ways and should be avoided. --- src/Parsing/SourceException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Parsing/SourceException.php b/src/Parsing/SourceException.php index 8612f249..67092550 100644 --- a/src/Parsing/SourceException.php +++ b/src/Parsing/SourceException.php @@ -18,7 +18,7 @@ class SourceException extends \Exception public function __construct($sMessage, $iLineNo = 0) { $this->iLineNo = $iLineNo; - if (!empty($iLineNo)) { + if ($iLineNo !== 0) { $sMessage .= " [line no: $iLineNo]"; } parent::__construct($sMessage);