From c6c6467a59d89b4cfa927952119ba8d1feca5ec7 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 3 Oct 2017 14:29:28 -0700 Subject: [PATCH] Fixes #2803 - Plugin prefs with a value of '0' were not stored correctly. --- e107_handlers/plugin_class.php | 6 +++++- e107_plugins/_blank/plugin.xml | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index 49fc64641..49d78e983 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -3434,10 +3434,14 @@ class e107plugin $config = ($mode == 'core') ? e107::getConfig('core') : e107::getPlugConfig($mode); + + foreach ($prefArray['pref'] as $tag) { $key = varset($tag['@attributes']['name']); - $value = vartrue($tag['@value']); + $value = varset($tag['@value']); + + // $this->log("  Pref: ".$key." => ".$value); if(substr($value,0,5) == "e_UC_") // Convert Userclass constants. { diff --git a/e107_plugins/_blank/plugin.xml b/e107_plugins/_blank/plugin.xml index 0e80ea451..f05c659b3 100644 --- a/e107_plugins/_blank/plugin.xml +++ b/e107_plugins/_blank/plugin.xml @@ -22,6 +22,7 @@ 1 [more...] + 0