diff --git a/CRM/Utils/Hook/Joomla.php b/CRM/Utils/Hook/Joomla.php index e844c4abbb40..4f95215cd652 100644 --- a/CRM/Utils/Hook/Joomla.php +++ b/CRM/Utils/Hook/Joomla.php @@ -73,6 +73,9 @@ public function invokeViaUF( 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(); }