Skip to content

Commit cebc14e

Browse files
committed
CRM-14229 Static call to non static method in Joomla
An old static call to JMenu in civicrm.php throws a warning in current versions of PHP. This replaces it with the correct code from the Joomla API.
1 parent ceca9db commit cebc14e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

site/civicrm.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ function civicrm_invoke() {
5858
// overrride the GET values if conflict
5959
if (CRM_Utils_Array::value('Itemid', $_REQUEST)) {
6060
$component = JComponentHelper::getComponent('com_civicrm');
61-
$menu = JSite::getMenu();
62-
$params = $menu->getParams($_REQUEST['Itemid']);
61+
$app = JFactory::getApplication();
62+
$menu = $app->getMenu();
63+
$params = $menu->getParams($app->input->get('Itemid'));
6364
$args = array('task', 'id', 'gid', 'pageId', 'action', 'csid', 'component');
6465
$view = CRM_Utils_Array::value('view', $_REQUEST);
6566
if ($view) {

0 commit comments

Comments
 (0)