From 92b78d1db49ebbcff9c4749551d991ca73e78aea Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Sun, 25 Aug 2019 15:21:15 +0930 Subject: [PATCH] Fix deprecated JRequest for Joomla 4.0 --- CRM/Utils/System/Joomla.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/System/Joomla.php b/CRM/Utils/System/Joomla.php index 030b73cc6c80..966d28f4a90c 100644 --- a/CRM/Utils/System/Joomla.php +++ b/CRM/Utils/System/Joomla.php @@ -265,8 +265,12 @@ public function url( if ($config->userFrameworkFrontend) { $script = 'index.php'; - if (JRequest::getVar("Itemid") && (strpos($path, 'civicrm/payment/ipn') === FALSE)) { - $Itemid = "{$separator}Itemid=" . JRequest::getVar("Itemid"); + + // Get Itemid using JInput::get() + $input = Joomla\CMS\Factory::getApplication()->input; + $itemIdNum = $input->get("Itemid"); + if ($itemIdNum && (strpos($path, 'civicrm/payment/ipn') === FALSE)) { + $Itemid = "{$separator}Itemid=" . $itemIdNum; } }