From 7bf1fb148d89cadfa04f94474d489fd434846996 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Sat, 10 Aug 2013 16:28:25 +0300 Subject: [PATCH] code style fixes --- ipf/form.php | 4 +++- ipf/form/widget.php | 7 ++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ipf/form.php b/ipf/form.php index ac6f77d..7c884bb 100644 --- a/ipf/form.php +++ b/ipf/form.php @@ -68,8 +68,10 @@ abstract class IPF_Form implements Iterator $this->cleaned_data[$name] = $value; } } catch (IPF_Exception_Form $e) { - if (!isset($this->errors[$name])) $this->errors[$name] = array(); + if (!isset($this->errors[$name])) + $this->errors[$name] = array(); $this->errors[$name][] = $e->getMessage(); + if (isset($this->cleaned_data[$name])) { unset($this->cleaned_data[$name]); } diff --git a/ipf/form/widget.php b/ipf/form/widget.php index 8e7c235..8c6a499 100644 --- a/ipf/form/widget.php +++ b/ipf/form/widget.php @@ -1,6 +1,6 @@ attrs = $attrs; } - public function render($name, $value, $extra_attrs=array()) - { - throw new IPF_Exception('Not Implemented.'); - } + public abstract function render($name, $value, $extra_attrs=array()); public function extra_js() { -- 2.49.0