dev/drupal#52 Partial fix for Deprecated q variable
authorMathieu Lutfy <mathieu@symbiotic.coop>
Tue, 10 Sep 2019 13:24:48 +0000 (09:24 -0400)
committerMathieu Lutfy <mathieu@bidon.ca>
Tue, 10 Sep 2019 21:07:08 +0000 (17:07 -0400)
CRM/Utils/System/DrupalBase.php

index 829b3870d152bfcb32e46d6261bd23cc61408baf..115efaebebbec9b58c00eb0b4aef02dc65fa102f 100644 (file)
@@ -673,9 +673,7 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base {
    * @return bool
    */
   public function isFrontEndPage() {
-    // Get the menu items.
-    $args = explode('?', $_GET['q']);
-    $path = $args[0];
+    $path = CRM_Utils_System::getUrlPath();
 
     // Get the menu for above URL.
     $item = CRM_Core_Menu::get($path);