From 7147637c9ac78de0703365ad7098428049e3457d Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 22 Apr 2024 21:51:35 +0200 Subject: [PATCH] Fixed error injection --- src/Http/Http.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/Http.php b/src/Http/Http.php index 00569b20..4b95f4b8 100755 --- a/src/Http/Http.php +++ b/src/Http/Http.php @@ -534,7 +534,7 @@ public function run(Container $context): static /** @var Hook $error */ if (in_array('*', $error->getGroups())) { $dependency = new Dependency(); - $this->container->set( + $$context->set( $dependency ->setName('error') ->setCallback(fn () => $e) @@ -570,7 +570,7 @@ public function run(Container $context): static foreach (self::$errors as $error) { // Global error hooks if (in_array('*', $error->getGroups())) { $dependency = new Dependency(); - $this->container->set( + $context->set( $dependency ->setName('error') ->setCallback(fn () => $e)