Merge pull request #15357 from civicrm/5.18
[civicrm-core.git] / 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);