Skip to content

Commit 6efe618

Browse files
committed
fix: Apply suggestion
1 parent 207559c commit 6efe618

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

system/Entity/Entity.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public function fill(?array $data = null)
188188
*/
189189
public function toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array
190190
{
191-
$lastCastStatus = $this->_cast;
191+
$originalCast = $this->_cast;
192192
$this->_cast = $cast;
193193

194194
$keys = array_filter(array_keys($this->attributes), static fn ($key): bool => ! str_starts_with($key, '_'));
@@ -218,7 +218,7 @@ public function toArray(bool $onlyChanged = false, bool $cast = true, bool $recu
218218
}
219219
}
220220

221-
$this->_cast = $lastCastStatus;
221+
$this->_cast = $originalCast;
222222

223223
return $return;
224224
}

0 commit comments

Comments
 (0)