Skip to content

Commit bc7c7b3

Browse files
committed
fixed ordinal cache usage of Enum::getName() if ordinal=0
1 parent 45fc4f9 commit bc7c7b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Enum.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ final public function getValue()
119119
*/
120120
final public function getName()
121121
{
122-
return self::$names[static::class][$this->ordinal ?: $this->getOrdinal()];
122+
return self::$names[static::class][$this->ordinal ?? $this->getOrdinal()];
123123
}
124124

125125
/**

0 commit comments

Comments
 (0)