From 6ec7e639cc7c9a3b38c7ac28e532793f347c41d9 Mon Sep 17 00:00:00 2001 From: CiviCRM Date: Mon, 21 Dec 2015 15:10:16 -0800 Subject: [PATCH] CRM_Core_Config::customCSSURL - Don't tample empty values Ex: The 4.4 upgrader checks `customCSSURL` and sets `disable_core_css` depending on whether the value is empty. Since the addTrailingSlash was converting empty to '/', this caused bad upgrades. --- CRM/Core/Config/MagicMerge.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Config/MagicMerge.php b/CRM/Core/Config/MagicMerge.php index 57bf9c9c0f..884a65a25d 100644 --- a/CRM/Core/Config/MagicMerge.php +++ b/CRM/Core/Config/MagicMerge.php @@ -233,7 +233,10 @@ class CRM_Core_Config_MagicMerge { case 'setting-url-abs': case 'setting-url-rel': $type = (strstr($type, 'abs')) ? 'absolute' : 'relative'; - $value = CRM_Utils_File::addTrailingSlash($this->getSettings()->get($name)); + $value = $this->getSettings()->get($name); + if ($value) { + $value = CRM_Utils_File::addTrailingSlash($value); + } $this->cache[$k] = Civi::paths()->getUrl($value, $type); return $this->cache[$k]; -- 2.25.1