Skip to content

Commit d68d915

Browse files
Float handling should also be for reals and doubles
1 parent 4b83ad8 commit d68d915

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ public function originalIsEquivalent($key, $current)
11781178
} elseif ($this->hasCast($key, ['object', 'collection'])) {
11791179
return $this->castAttribute($key, $current) ==
11801180
$this->castAttribute($key, $original);
1181-
} elseif ($this->hasCast($key, 'float')) {
1181+
} elseif ($this->hasCast($key, ['real', 'float', 'double'])) {
11821182
return bccomp(
11831183
$this->castAttribute($key, $current),
11841184
$this->castAttribute($key, $original)

0 commit comments

Comments
 (0)