[icinga-checkins] icinga.org: icingaweb2-module-director/fiddle/mfrosch: Import: keep boolean values

git at icinga.org git at icinga.org
Thu May 19 16:46:13 CEST 2016


Module: icingaweb2-module-director
Branch: fiddle/mfrosch
Commit: deea18f8df4d13a9c9a6e2d3009cecbedb574929
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=deea18f8df4d13a9c9a6e2d3009cecbedb574929

Author: Thomas Gelf <thomas at gelf.net>
Date:   Tue May 17 15:46:20 2016 +0200

Import: keep boolean values

---

 library/Director/Import/Import.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/Director/Import/Import.php b/library/Director/Import/Import.php
index 3dee29d..e207188 100644
--- a/library/Director/Import/Import.php
+++ b/library/Director/Import/Import.php
@@ -195,7 +195,7 @@ class Import
      */
     protected function prepareImportedProperty($key, $rawValue)
     {
-        if (is_array($rawValue)) {
+        if (is_array($rawValue) || is_bool($rawValue)) {
             $value = json_encode($rawValue);
             $format = 'json';
         } elseif ($rawValue instanceof stdClass) {



More information about the icinga-checkins mailing list