Skip to content

Commit

Permalink
removeKeysFromArray -- update
Browse files Browse the repository at this point in the history
  • Loading branch information
tamedevelopers committed Dec 5, 2024
1 parent a96ed88 commit 6dd5297
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static public function removeKeysFromArray($data, ...$keys)
foreach ($data as &$item) {
// Remove specified keys from the item
foreach ($keys as $key) {
if (isset($item[$key])) {
if (array_key_exists($key, $item)) {
unset($item[$key]);
}
}
Expand Down

0 comments on commit 6dd5297

Please sign in to comment.