Fix `cv` failure on J3.
authorAidan Saunders <aidan.saunders@squiffle.uk>
Fri, 6 Jan 2023 10:48:14 +0000 (10:48 +0000)
committerAidan Saunders <aidan.saunders@squiffle.uk>
Tue, 10 Jan 2023 13:50:56 +0000 (13:50 +0000)
CRM/Utils/Hook/Joomla.php

index e844c4abbb4015044caeedf8fcca38c935cf1666..4f95215cd652682ffe09015ba09a88e8eb69bba5 100644 (file)
@@ -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();
         }