From 03d8f8f3cccc73fbf317d207d275cb8053c4b1a5 Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Tue, 19 Nov 2013 17:24:41 -0800 Subject: [PATCH] do not use a hook return value - fixes notice in joomla install --- CRM/Core/BAO/Setting.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index 349c74df22..ba941b9685 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -143,7 +143,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { $domainID = NULL ) { if (self::isUpgradeFromPreFourOneAlpha1()) { - // civicrm_setting table is not going to be present. For now we'll just + // civicrm_setting table is not going to be present. For now we'll just // return a dummy object $dao = new CRM_Core_DAO_Domain(); $dao->id = -1; // so ->find() doesn't fetch any data later on @@ -646,12 +646,19 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { $cached = 0; } - $hookCacheString = CRM_Utils_Hook::alterSettingsMetaData($settingsMetadata, $domainID, $profile); + CRM_Utils_Hook::alterSettingsMetaData($settingsMetadata, $domainID, $profile); self::_filterSettingsSpecification($filters, $settingsMetadata); - if(!$cached || !empty($hookCacheString)){ - // this is a bit 'heavy' if you are using hooks but this function is expected to only be called during setting administration + + if (!$cached) { + // this is a bit 'heavy' if you are using hooks but this function + // is expected to only be called during setting administration // it should not be called by 'getvalue' or 'getitem - CRM_Core_BAO_Cache::setItem($settingsMetadata,'CiviCRM setting Specs', $cacheString . $hookCacheString, $componentID); + CRM_Core_BAO_Cache::setItem( + $settingsMetadata, + 'CiviCRM setting Specs', + $cacheString, + $componentID + ); } return $settingsMetadata; -- 2.25.1