From 8b15d2e9f9cdc30016af8d015b536df52d67f364 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 27 Jan 2016 16:25:07 -0500 Subject: [PATCH] Fix undefined index --- CRM/Core/Config.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index a0b34fad49..1c0844d306 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -417,7 +417,10 @@ class CRM_Core_Config extends CRM_Core_Config_MagicMerge { && !empty($_SERVER['HTTP_REFERER']) ) { $ref = parse_url($_SERVER['HTTP_REFERER']); - if (preg_match('/civicrm\/upgrade/', $ref['path']) || preg_match('/civicrm\/upgrade/', urldecode($ref['query']))) { + if ( + (!empty($ref['path']) && preg_match('/civicrm\/upgrade/', $ref['path'])) || + (!empty($ref['query']) && preg_match('/civicrm\/upgrade/', urldecode($ref['query']))) + ) { return TRUE; } } -- 2.25.1