From: Andrey Kutejko Date: Sat, 10 Aug 2013 13:28:25 +0000 (+0300) Subject: code style fixes X-Git-Tag: 0.5~77 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=7bf1fb148d89cadfa04f94474d489fd434846996;p=ipf.git code style fixes --- 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() {