From: Seamus Lee Date: Sun, 11 Jun 2017 04:23:49 +0000 (+1000) Subject: Only ensure that we check if the value passed is 0 and the db value is 0 or NULL X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c01cb311b6a278634796ae03138db5d726b1d506;p=civicrm-core.git Only ensure that we check if the value passed is 0 and the db value is 0 or NULL --- diff --git a/Civi/Core/SettingsBag.php b/Civi/Core/SettingsBag.php index 8f623da29e..b117309796 100644 --- a/Civi/Core/SettingsBag.php +++ b/Civi/Core/SettingsBag.php @@ -352,7 +352,7 @@ class SettingsBag { } $dao->find(TRUE); - if (isset($metadata['on_change']) && $value != 0 && !($dao->value === NULL || unserialize($dao->value) == 0)) { + if (isset($metadata['on_change']) && !($value === 0 && ($dao->value === NULL || unserialize($dao->value) === 0))) { foreach ($metadata['on_change'] as $callback) { call_user_func( \Civi\Core\Resolver::singleton()->get($callback),