Skip to content

Commit

Permalink
Optimize ContainerResolver array handling
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Dec 1, 2024
1 parent 92267ed commit eed5575
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Slim/Container/ContainerResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function resolve(callable|object|array|string $identifier): mixed

// The callable is an array whose first item is a container entry name
// e.g. ['some-container-entry', 'methodToCall']
if (is_array($identifier) && is_string($identifier[0] ?? null)) {
if (is_string($identifier[0] ?? null)) {
// Replace the container entry name by the actual object
$identifier[0] = $this->container->get($identifier[0]);

Expand Down

0 comments on commit eed5575

Please sign in to comment.