소스 검색

Fix adding a product with missing price

Johannes Zellner 5 년 전
부모
커밋
c51f3c8dba
1개의 변경된 파일과 2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      website/DataBase/Price.php

+ 2 - 0
website/DataBase/Price.php

@@ -21,6 +21,8 @@ class Price
 
 	function create($priceset_id, $product_id, $price)
 	{
+		if (!$price) $price = 0;
+
 		$query = "INSERT INTO ".$this->db->price_table." VALUES(0, ".$priceset_id.", '".$product_id."', ".$price.")";
 
 		$this->db->query($query);