From ccab2b7af4a82cd67799f33b4f1766101d835f9d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Feb 2014 19:00:06 +0100 Subject: [PATCH] Fix: Must use "null" for value when finished is not defined but not when finished is "0". --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 6a615ce01c2..e1fb258f11e 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -338,7 +338,7 @@ class Product extends CommonObject $sql.= ", ".$this->status; $sql.= ", ".$this->status_buy; $sql.= ", '".$this->canvas."'"; - $sql.= ", ".((! isset($this->finished) || $this->finished < 0)?'null':$this->finished); + $sql.= ", ".((! isset($this->finished) || $this->finished < 0 || $this->finished == '') ? 'null' : $this->finished); $sql.= ")"; dol_syslog(get_class($this)."::Create sql=".$sql);