Skip to content

Commit 8ed95e8

Browse files
committed
fix(PhpEnum):Fix bccomp scale bug
1 parent 081f755 commit 8ed95e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpEnum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public final function propertyEquals($property, $value, $strict = true)
156156
return false;
157157
}
158158
$scale = intval($this->scale());
159-
if ($scale > 0 || !extension_loaded('bcmath')) {
159+
if ($scale <= 0 || !extension_loaded('bcmath')) {
160160
return strval($mixed) === strval($value);
161161
}
162162
return bccomp(strval($mixed), strval($value), $scale) === 0;

0 commit comments

Comments
 (0)