Skip to content

Commit

Permalink
Move call to tagIsInvalid to FormHelper
Browse files Browse the repository at this point in the history
tagIsInvalid() doesn't exist in Helper, and shouldn't be
called from that class.

Fixes #2411
  • Loading branch information
markstory committed Dec 24, 2011
1 parent ca14583 commit 2c0e030
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/Cake/View/Helper.php
Expand Up @@ -672,9 +672,6 @@ protected function _initInputField($field, $options = array()) {
$options = $this->_name($options);
$options = $this->value($options);
$options = $this->domId($options);
if ($this->tagIsInvalid() !== false) {
$options = $this->addClass($options, 'form-error');
}
return $options;
}

Expand Down
3 changes: 3 additions & 0 deletions lib/Cake/View/Helper/FormHelper.php
Expand Up @@ -2495,6 +2495,9 @@ protected function _initInputField($field, $options = array()) {
}

$result = parent::_initInputField($field, $options);
if ($this->tagIsInvalid() !== false) {
$result = $this->addClass($result, 'form-error');
}
if ($secure === self::SECURE_SKIP) {
return $result;
}
Expand Down

0 comments on commit 2c0e030

Please sign in to comment.