Skip to content

Commit

Permalink
Fix the replace() method in DefaultService class (#49022)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonagoldman authored Nov 16, 2023
1 parent 6e4ecc7 commit f17491a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Support/DefaultProviders.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function replace(array $replacements)
foreach ($replacements as $from => $to) {
$key = $current->search($from);

$current = $key ? $current->replace([$key => $to]) : $current;
$current = is_int($key) ? $current->replace([$key => $to]) : $current;
}

return new static($current->values()->toArray());
Expand Down

0 comments on commit f17491a

Please sign in to comment.