From 6c5dfc04f72c6856d29a7c9925ccaded4522adb3 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Fri, 21 Jun 2013 14:19:41 -0400 Subject: [PATCH] Added default value for error in Model::addError(). --- framework/yii/base/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/base/Model.php b/framework/yii/base/Model.php index e9fc032..ae739fc 100644 --- a/framework/yii/base/Model.php +++ b/framework/yii/base/Model.php @@ -476,7 +476,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess * @param string $attribute attribute name * @param string $error new error message */ - public function addError($attribute, $error) + public function addError($attribute, $error = '') { $this->_errors[$attribute][] = $error; }