From 85c6b530040f58f0e12a8eddc5265e7d4f178d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 25 Feb 2021 18:06:41 +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 | 2 +- Database/SqlBuilder.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Database/ActiveRecord.php b/Database/ActiveRecord.php index 58456178..0a2b6624 100644 --- a/Database/ActiveRecord.php +++ b/Database/ActiveRecord.php @@ -163,7 +163,7 @@ class ActiveRecord extends BaseActiveRecord if (is_bool($create)) { return false; } - return static::getDb()->createCommand($create)->exec(); + return static::getDb()->createCommand($create[0], $create[1])->exec(); } diff --git a/Database/SqlBuilder.php b/Database/SqlBuilder.php index 04f7c203..ec4453fa 100644 --- a/Database/SqlBuilder.php +++ b/Database/SqlBuilder.php @@ -51,7 +51,7 @@ class SqlBuilder extends Component public function update(array $attributes): bool|array { [$string, $array] = $this->builderParams($attributes); - if (empty($string)) { + if (empty($string) || empty($array)) { return $this->addError('None data update.'); }