From c01cb311b6a278634796ae03138db5d726b1d506 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sun, 11 Jun 2017 14:23:49 +1000 Subject: [PATCH] Only ensure that we check if the value passed is 0 and the db value is 0 or NULL --- Civi/Core/SettingsBag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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), -- 2.25.1