From 26fc318af58df3029e61f75e30daa9859dd08b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 6 Aug 2021 18:03:31 +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/Base/BaseActiveRecord.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 01d1a349..6c43c814 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -511,6 +511,9 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess */ private function updateInternal($fields, $condition, $param): bool|static { + if (empty($param)) { + return true; + } if ($this->hasPrimary()) { $condition = [$this->getPrimary() => $this->getPrimaryValue()]; }