From 06640bac3f2ad54332e1f54b17d58939513060b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D1=91=D0=B4=D0=BE=D1=80=20=D0=9F=D0=BE=D0=B4=D0=BB?= =?UTF-8?q?=D0=B5=D1=81=D0=BD=D0=BE=D0=B2?= Date: Thu, 28 Jul 2016 17:19:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B8=20=D1=84=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/validator/rule/isfile.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/validator/rule/isfile.php b/core/validator/rule/isfile.php index 37a03b9..a2385ad 100644 --- a/core/validator/rule/isfile.php +++ b/core/validator/rule/isfile.php @@ -29,6 +29,11 @@ class Rule_IsFile extends Rule_Abstract return false; } + if ($_FILES[$this->field]['error'] == UPLOAD_ERR_INI_SIZE) { + $this->setErrorMsg('Превышен размер файла'); + return false; + } + $tmp = $_FILES[$this->field]; if (!in_array($tmp['type'], $this->type)) { $this->setErrorMsg('Неверный формат файла');