From 60d0e172519e4a00a085a7f5dadc5ea3323c7d81 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 29 Jan 2024 10:12:55 +1100 Subject: [PATCH] Fix issue with dispatching allowRoutes event --- ext/oembed/Civi/Oembed/Router.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/oembed/Civi/Oembed/Router.php b/ext/oembed/Civi/Oembed/Router.php index 416beb315d5b..8978deacde8e 100644 --- a/ext/oembed/Civi/Oembed/Router.php +++ b/ext/oembed/Civi/Oembed/Router.php @@ -35,9 +35,9 @@ public function isAllowedRoute(string $route): bool { } $list = explode("\n", \Civi::settings()->get('oembed_allow_other')); - \Civi::dispatcher()->dispatch('civi.oembed.allowRoutes', [ + \Civi::dispatcher()->dispatch('civi.oembed.allowRoutes', \Civi\Core\Event\GenericHookEvent::create([ 'routes' => &$list, - ]); + ])); $matches = \CRM_Utils_String::filterByWildcards($list, [$route]); if (!empty($matches)) { return TRUE;