Skip to content
This repository was archived by the owner on Mar 12, 2024. It is now read-only.

Commit 177e331

Browse files
committed
check the key is string
1 parent 60ccecb commit 177e331

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/LoopFunctions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function arrayToProperties(?array $data, mixed $rescue = null): void
7272
*/
7373
private function assignValue(int|string $key, mixed $value, mixed $rescue = null): void
7474
{
75-
if (property_exists($this, $key)) {
75+
if (is_string($key) && property_exists($this, $key)) {
7676
rescue(
7777
fn () => ! empty($this->{$key}) ?: $this->{$key} = $value,
7878
$rescue,

0 commit comments

Comments
 (0)