From 3714202dd9786bb7bdfb86cac3e5a567c4462176 Mon Sep 17 00:00:00 2001 From: toxyy Date: Sat, 9 Dec 2023 14:50:13 -0500 Subject: [PATCH] [ticket/15214] Move $ext_namespace str_replace to work Added this when I initially tested the if block move. but I forgot to add it in the actual commit. If this isn't moved, no template events work, and the tests fail. PHPBB3-15214 --- phpBB/phpbb/template/twig/node/event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/template/twig/node/event.php b/phpBB/phpbb/template/twig/node/event.php index dfb89f1dc9..6d8940a91a 100644 --- a/phpBB/phpbb/template/twig/node/event.php +++ b/phpBB/phpbb/template/twig/node/event.php @@ -51,9 +51,9 @@ class event extends \Twig\Node\Node // Group and sort extension template events in according to their priority (0 by default if not set) foreach ($this->environment->get_phpbb_extensions() as $ext_namespace => $ext_path) { + $ext_namespace = str_replace('/', '_', $ext_namespace); if ($this->environment->isDebug() || $this->environment->getLoader()->exists('@' . $ext_namespace . '/' . $location . '.html')) { - $ext_namespace = str_replace('/', '_', $ext_namespace); $priority_key = $this->template_event_priority_array[$ext_namespace][$location] ?? 0; $template_events[$priority_key][] = $ext_namespace; }