From: CiviCRM Date: Mon, 21 Dec 2015 23:10:16 +0000 (-0800) Subject: CRM_Core_Config::customCSSURL - Don't tample empty values X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6ec7e639cc7c9a3b38c7ac28e532793f347c41d9;p=civicrm-core.git 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. --- 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];