From e2c9a4d7bbffac84f75b813f69c70f751d13f7b6 Mon Sep 17 00:00:00 2001 From: Poluect Date: Wed, 5 Aug 2015 10:26:22 +0300 Subject: [PATCH] fix InputFilter Element MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Когда не проходит isValid, он все значения элементов перезатирает на null. и когда в контроллере для вывода ошибок с введенными значениями вызывается getValues(), все невалидные значения будут пустыми. из-за этого и перезатирался урл, значение которому присваивалось в методе isValid, а сейчас и другие элементы перезатираются. --- src/T4webBase/InputFilter/Element/Element.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/T4webBase/InputFilter/Element/Element.php b/src/T4webBase/InputFilter/Element/Element.php index e1e582d..7b469d4 100644 --- a/src/T4webBase/InputFilter/Element/Element.php +++ b/src/T4webBase/InputFilter/Element/Element.php @@ -23,15 +23,15 @@ public function __construct($name = '') { } } - public function isValid($context = null) { - $result = parent::isValid($context); + // public function isValid($context = null) { + // $result = parent::isValid($context); - if (!$result) { - $this->value = $this->defaultValue; - } + // if (!$result) { + // $this->value = $this->defaultValue; + // } - return $result; - } + // return $result; + // } public function isDefaultValue() { return $this->value === $this->defaultValue;