Skip to content

Commit

Permalink
fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 15, 2022
1 parent ae4f2ab commit d39d92d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Collections/Arr.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ public static function exists($array, $key)
return $array->offsetExists($key);
}

if (is_float($key)) {
$key = (string) $key;
}

return array_key_exists($key, $array);
}

Expand Down

0 comments on commit d39d92d

Please sign in to comment.