From 5912e45669e172753d7cac6d7e578f4ddc14d371 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 15 Aug 2016 20:02:56 +0800 Subject: [PATCH] =?UTF-8?q?Model=E7=B1=BBsaveall=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/library/think/Model.php b/library/think/Model.php index 8eaf525b..cb7bd21f 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -729,17 +729,16 @@ abstract class Model implements \JsonSerializable, \ArrayAccess * 保存多个数据到当前数据对象 * @access public * @param array $dataSet 数据 - * @param bool $replace 是否replace * @return array|false */ - public function saveAll($dataSet, $replace = false) + public function saveAll($dataSet) { $result = []; $db = $this->db(); $db->startTrans(); try { foreach ($dataSet as $key => $data) { - $result[$key] = self::create($data, $replace, false); + $result[$key] = self::create($data); } $db->commit(); return $result;