Skip to content

Commit

Permalink
Update isFieldError() to use the context object.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Feb 20, 2014
1 parent 92daf3d commit 5b27f40
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/View/Helper/FormHelper.php
Expand Up @@ -575,8 +575,7 @@ protected function _secure($lock, $field, $value = null) {
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::isFieldError
*/
public function isFieldError($field) {
$this->setEntity($field);
return (bool)$this->tagIsInvalid();
return $this->_getContext()->hasError($field);
}

/**
Expand Down

0 comments on commit 5b27f40

Please sign in to comment.