Permalink
Browse files

Update isFieldError() to use the context object.

  • Loading branch information...
1 parent 92daf3d commit 5b27f40c1662dfeee7e7eaf371c715de5dd913ae @markstory markstory committed with markstory Feb 20, 2014
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/View/Helper/FormHelper.php
@@ -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);
}
/**

0 comments on commit 5b27f40

Please sign in to comment.