Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.0
-
Fix Version/s: 4.3.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
Calling CRM_Core_BAO_Setting::setItem() to set something and then calling getItem right after seems to return the value from before you set it, not the new one. To reproduce, create a simple unit test where all within the same function you just do:
$mailingBackend = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
'mailing_backend'
);
$mailingBackend['outBound_option'] = 2;
CRM_Core_BAO_Setting::setItem($mailingBackend,
CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
'mailing_backend'
);
Then call getItem again and compare the results.