diff --git a/module/product/model.php b/module/product/model.php index fadfed5299..424628010d 100755 --- a/module/product/model.php +++ b/module/product/model.php @@ -509,7 +509,7 @@ class productModel extends model ->checkFlow() ->exec(); if(dao::isError()) return false; - $productID = (int)$this->dao->lastInsertID(); + $productID = $this->dao->lastInsertID(); /* Fix order and line fields for product. */ $fixData = new stdclass(); diff --git a/module/product/tao.php b/module/product/tao.php index 3609202541..0c2a139929 100644 --- a/module/product/tao.php +++ b/module/product/tao.php @@ -564,7 +564,7 @@ class productTao extends productModel $this->dao->insert(TABLE_MODULE)->data($line)->exec(); if(dao::isError()) return false; - $lineID = (int)$this->dao->lastInsertID(); + $lineID = $this->dao->lastInsertID(); $path = ",$lineID,"; $this->dao->update(TABLE_MODULE)->set('path')->eq($path)->set('`order`')->eq($lineID)->where('id')->eq($lineID)->exec(); @@ -601,7 +601,7 @@ class productTao extends productModel $this->dao->insert(TABLE_DOCLIB)->data($lib)->exec(); if(dao::isError())return false; - return (int)$this->dao->lastInsertID(); + return $this->dao->lastInsertID(); } /**