From a4afc1c481282b2804157f254d91094010b8e3be Mon Sep 17 00:00:00 2001 From: David Durieux Date: Fri, 28 Sep 2018 22:08:53 +0200 Subject: [PATCH] Fix for NULL values in the database. closes #97 --- inc/commoninjectionlib.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/commoninjectionlib.class.php b/inc/commoninjectionlib.class.php index a47199ce..1ffaa11f 100644 --- a/inc/commoninjectionlib.class.php +++ b/inc/commoninjectionlib.class.php @@ -860,7 +860,11 @@ private function setValueForItemtype($itemtype, $field, $value, $fromdb = false) } } else { // First value - $this->values[$itemtype][$field] = $value; + if (is_null($value)) { + $this->values[$itemtype][$field] = "NULL"; + } else { + $this->values[$itemtype][$field] = $value; + } } }