Skip to content

Commit 9c87bf0

Browse files
committed
Setting an enum to null is the same as zero
1 parent c58f414 commit 9c87bf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PHPFUI/ORM/Enum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function fromPHPValue(mixed $value, array $parameters) : mixed
1111
{
1212
$enum = $parameters[0];
1313

14-
return $enum::from($value);
14+
return $enum::from($value ?? 0);
1515
}
1616

1717
/**

0 commit comments

Comments
 (0)