diff --git a/htdocs/product.class.php b/htdocs/product.class.php index 67b3c733d40..a37e5333f56 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -73,8 +73,9 @@ class Product */ function create($user) { - $this->ref = ereg_replace("'","",stripslashes($this->ref)); - $this->ref = ereg_replace("\"","",stripslashes($this->ref)); + $this->ref = ereg_replace("'","",stripslashes($this->ref)); + $this->ref = ereg_replace("\"","",stripslashes($this->ref)); + $sql = "SELECT count(*)"; $sql .= " FROM ".MAIN_DB_PREFIX."product WHERE ref = '" .trim($this->ref)."'"; @@ -119,8 +120,12 @@ class Product return -1; } } + else + { + return -3; + } } - } + } /** * *