From dbb2d7bbf0139ece769d5f47e2b209f25395442c Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Mon, 2 Dec 2019 11:33:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=8E=92=E5=BA=8F=E4=B8=8D?= =?UTF-8?q?=E5=BE=97=E5=A4=A7=E4=BA=8E65535?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/antgoods/goods/src/models/ars/Attribute.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vendor/antgoods/goods/src/models/ars/Attribute.php b/vendor/antgoods/goods/src/models/ars/Attribute.php index 496dbc7..75ce239 100644 --- a/vendor/antgoods/goods/src/models/ars/Attribute.php +++ b/vendor/antgoods/goods/src/models/ars/Attribute.php @@ -55,9 +55,12 @@ class Attribute extends \yii\db\ActiveRecord */ public function checkNegative($attribute, $params) { - if ((integer)$this->$attribute < 0) { + if ($this->$attribute < 0) { $this->addError($attribute, "不得为负数"); } + if ($this->$attribute > 65535) { + $this->addError($attribute, "不得大于65535"); + } } /**