+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
*
* @param array $defaults
* Array(string $settingName => mixed $value).
- * @return $this
+ * @return SettingsBag
*/
public function loadDefaults($defaults) {
$this->defaults = $defaults;
*
* @param array $mandatory
* Array(string $settingName => mixed $value).
- * @return $this
+ * @return SettingsBag
*/
public function loadMandatory($mandatory) {
$this->mandatory = $mandatory;
/**
* Load all explicit settings that apply to this domain or contact.
*
- * @return $this
+ * @return SettingsBag
*/
public function loadValues() {
// Note: Don't use DAO child classes. They require fields() which require
*
* @param array $settings
* Array(string $settingName => mixed $settingValue).
- * @return $this
+ * @return SettingsBag
*/
public function add(array $settings) {
foreach ($settings as $key => $value) {
*
* @param string $key
* The simple name of the setting.
- * @return $this
+ * @return SettingsBag
*/
public function revert($key) {
// It might be better to DELETE (to avoid long-term leaks),
* The simple name of the setting.
* @param mixed $value
* The new, explicit value of the setting.
- * @return $this
+ * @return SettingsBag
*/
public function set($key, $value) {
$this->setDb($key, $value);
}
}
- if (\CRM_Utils_System::isNull($value)) {
+ if (!is_array($value) && \CRM_Utils_System::isNull($value)) {
$dao->value = 'null';
}
else {