From 7ec4b96de01213eb01a60439df21d076325e2bf2 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 12 Aug 2016 13:46:25 -0400 Subject: [PATCH] CRM-17663 - fullscreen_url should be optional --- CRM/Core/BAO/Dashboard.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Core/BAO/Dashboard.php b/CRM/Core/BAO/Dashboard.php index a53bb6c6fc..69926140ee 100644 --- a/CRM/Core/BAO/Dashboard.php +++ b/CRM/Core/BAO/Dashboard.php @@ -134,7 +134,7 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard { 'label' => $item['dashboard_id.label'], 'url' => $item['dashboard_id.url'], 'cache_minutes' => $item['dashboard_id.cache_minutes'], - 'fullscreen_url' => $item['dashboard_id.fullscreen_url'], + 'fullscreen_url' => CRM_Utils_Array::value('dashboard_id.fullscreen_url', $item), ); } } @@ -217,7 +217,7 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard { 'label' => $dashlet['label'], 'cache_minutes' => $dashlet['cache_minutes'], 'url' => $dashlet['url'], - 'fullscreen_url' => $dashlet['fullscreen_url'], + 'fullscreen_url' => CRM_Utils_Array::value('fullscreen_url', $dashlet), ); } } @@ -231,7 +231,7 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard { */ public static function parseUrl($url) { // Check if it is already a fully-formed url - if (substr($url, 0, 4) != 'http' && $url[0] != '/') { + if ($url && substr($url, 0, 4) != 'http' && $url[0] != '/') { $urlParam = explode('?', $url); $url = CRM_Utils_System::url($urlParam[0], CRM_Utils_Array::value(1, $urlParam), FALSE, NULL, FALSE); } -- 2.25.1