From 69b5ef64372ec57391a73937d9a169e246867806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 25 Aug 2023 00:32:38 +0800 Subject: [PATCH] qqq --- Base/Model.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Base/Model.php b/Base/Model.php index d85aa73..e920295 100644 --- a/Base/Model.php +++ b/Base/Model.php @@ -406,9 +406,6 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T */ public function setAttributes(array $param): static { - if (count($param) < 1) { - return $this; - } foreach ($param as $key => $attribute) { $this->setAttribute($key, $attribute); } @@ -419,13 +416,9 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T /** * @param array $param * @return $this - * @throws ReflectionException */ public function setOldAttributes(array $param): static { - if (count($param) < 1) { - return $this; - } foreach ($param as $key => $attribute) { $this->setOldAttribute($key, $attribute); }