mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-10-01 09:04:07 +02:00
psalm fixes
This commit is contained in:
parent
bd8f0e9116
commit
bfbb443163
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue