diff --git a/src/Factory/StackedHttpKernel.php b/src/Factory/StackedHttpKernel.php index 9953c96..3410adb 100644 --- a/src/Factory/StackedHttpKernel.php +++ b/src/Factory/StackedHttpKernel.php @@ -38,7 +38,8 @@ public function __construct(Container $container, $services) */ public function register(HttpKernelInterface $app = null, $name = '', array $parameters = array()) { - $lastServiceName = call_user_func('end', array_keys($this->services)); + $services = array_keys($this->services); + $lastServiceName = end($services); $builder = new \Stack\Builder(); $container = $this->container;