From 8f6fefed93a6d6960cea4a91aa10b572eeb107c8 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 11 Aug 2016 23:29:03 -0400 Subject: [PATCH] CRM-17663 - More tolerant url parsing --- CRM/Core/BAO/Dashboard.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Core/BAO/Dashboard.php b/CRM/Core/BAO/Dashboard.php index f0f4c03f8d..a53bb6c6fc 100644 --- a/CRM/Core/BAO/Dashboard.php +++ b/CRM/Core/BAO/Dashboard.php @@ -230,9 +230,10 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard { * @return string */ public static function parseUrl($url) { - if (substr($url, 0, 4) != 'http') { + // Check if it is already a fully-formed url + if (substr($url, 0, 4) != 'http' && $url[0] != '/') { $urlParam = explode('?', $url); - $url = CRM_Utils_System::url($urlParam[0], $urlParam[1], FALSE, NULL, FALSE); + $url = CRM_Utils_System::url($urlParam[0], CRM_Utils_Array::value(1, $urlParam), FALSE, NULL, FALSE); } return $url; } -- 2.25.1