From c618153cb17b62bf52473c1eddb5fccee0b039f5 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 12 Jun 2017 08:08:21 +1000 Subject: [PATCH] Allow for value to be a string '0' --- 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 b117309796..1428949924 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