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)