From 99999a6f9c9f9463332a5520d952a695235f6f66 Mon Sep 17 00:00:00 2001 From: Aidan Saunders Date: Fri, 6 Jan 2023 10:48:14 +0000 Subject: [PATCH] Fix `cv` failure on J3. --- CRM/Utils/Hook/Joomla.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Utils/Hook/Joomla.php b/CRM/Utils/Hook/Joomla.php index e844c4abbb..4f95215cd6 100644 --- a/CRM/Utils/Hook/Joomla.php +++ b/CRM/Utils/Hook/Joomla.php @@ -73,6 +73,9 @@ class CRM_Utils_Hook_Joomla extends CRM_Utils_Hook { if (version_compare(JVERSION, '3.0', 'lt')) { $app = JCli::getInstance(); } + elseif (version_compare(JVERSION, '4.0', 'lt')) { + $app = JApplicationCli::getInstance(); + } else { $app = \Joomla\CMS\Factory::getApplication(); } -- 2.25.1