From 4eba41a0bcbbd050b82b90e53b3b7bf2c848ca62 Mon Sep 17 00:00:00 2001 From: Ian Morland Date: Wed, 11 Oct 2023 17:11:55 +0100 Subject: [PATCH] Revert "attempt to make stan happy" This reverts commit 1cc327bb3b1cc52273b18488f9cc926f43d8858e. --- framework/core/src/Extend/Conditional.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/framework/core/src/Extend/Conditional.php b/framework/core/src/Extend/Conditional.php index b74ce9c851..55584beebe 100644 --- a/framework/core/src/Extend/Conditional.php +++ b/framework/core/src/Extend/Conditional.php @@ -81,15 +81,14 @@ public function extend(Container $container, Extension $extension = null) if ($condition['condition']) { $extenders = $condition['extenders']; - $resolvedExtenders = []; - if (is_string($extenders) || is_callable($extenders)) { - $resolvedExtenders = $container->call($extenders); - } else { - $resolvedExtenders = $extenders; + if (is_string($extenders)) { + $extenders = $container->call($extenders); + } elseif (is_callable($extenders)) { + $extenders = $container->call($extenders); } - foreach ($resolvedExtenders as $extender) { + foreach ($extenders as $extender) { $extender->extend($container, $extension); } }