From bfbb4431636560d333b77c52eedd12a0b3772297 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 31 Aug 2026 16:59:30 +0200 Subject: [PATCH] psalm fixes --- src/Exception/Exception.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exception/Exception.php b/src/Exception/Exception.php index f5afebf..ef5f9f9 100644 --- a/src/Exception/Exception.php +++ b/src/Exception/Exception.php @@ -37,7 +37,7 @@ class Exception extends \Exception { * @return Exception */ public static function fromMap(array $exceptionMap, $error, ?string $path): Exception { - if (isset($exceptionMap[$error])) { + if ($error !== null && isset($exceptionMap[$error])) { $exceptionClass = $exceptionMap[$error]; if (is_numeric($error)) { return new $exceptionClass($path, (int)$error);