From 66fcf622aaace5dc2a5a20d1b098ea0c86b7ae3a Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Fri, 29 Mar 2013 01:36:13 +0400 Subject: [PATCH] Fixed Model::getFirstErrors() --- framework/base/Model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/base/Model.php b/framework/base/Model.php index 402a558..5e55f8d 100644 --- a/framework/base/Model.php +++ b/framework/base/Model.php @@ -429,9 +429,9 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess return array(); } else { $errors = array(); - foreach ($this->_errors as $errors) { - if (isset($errors[0])) { - $errors[] = $errors[0]; + foreach ($this->_errors as $attributeErrors) { + if (isset($attributeErrors[0])) { + $errors[] = $attributeErrors[0]; } } }