From 402764aecf93e00ab4d9b19beb7b2f05859def93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 10 Sep 2020 16:59:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/ActiveRecord.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Database/ActiveRecord.php b/Database/ActiveRecord.php index ac0ef23c..d20d5182 100644 --- a/Database/ActiveRecord.php +++ b/Database/ActiveRecord.php @@ -188,9 +188,9 @@ class ActiveRecord extends BaseActiveRecord * @return bool|static * @throws Exception */ - public static function insertOrUpdate(array $condition, array $params) + public static function insertOrUpdate(array $params, array $condition) { - $first = static::findOrCreate($condition, $params); + $first = static::findOrCreate($params, $condition); $first->attributes = $params; if (!$first->save()) { return false;