Skip to content

Commit 0b720b9

Browse files
authored
Use array_key_exists() as an extra check
1 parent 5e044e6 commit 0b720b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Enum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public static function search($value)
177177
public static function __callStatic($name, $arguments)
178178
{
179179
$array = static::toArray();
180-
if (array_key_exists($name, $array)) {
180+
if (isset($array[$name]) || array_key_exists($name, $array)) {
181181
return new static($array[$name]);
182182
}
183183

0 commit comments

Comments
 (0)