From a4fc424b400f9c7f96f24d92839fc7a53af31114 Mon Sep 17 00:00:00 2001 From: Ber Clausen Date: Tue, 27 Sep 2011 13:22:08 -0300 Subject: [PATCH 1/2] Update Set::extract() calls inside Helper. --- cake/libs/view/helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cake/libs/view/helper.php b/cake/libs/view/helper.php index a25e4f9b9..734f7e8bc 100644 --- a/cake/libs/view/helper.php +++ b/cake/libs/view/helper.php @@ -586,7 +586,7 @@ class Helper extends Overloadable { $errors = $this->validationErrors; $entity = $view->entity(); if (!empty($entity)) { - return Set::extract($errors, join('.', $entity)); + return Set::extract(join('.', $entity), $errors); } } @@ -704,7 +704,7 @@ class Helper extends Overloadable { $entity = $view->entity(); if (!empty($this->data) && !empty($entity)) { - $result = Set::extract($this->data, join('.', $entity)); + $result = Set::extract(join('.', $entity), $this->data); } $habtmKey = $this->field(); From b5ddd4e5b7f67b503bb25983182b0245865d650c Mon Sep 17 00:00:00 2001 From: Ber Clausen Date: Tue, 27 Sep 2011 13:55:32 -0300 Subject: [PATCH 2/2] Update Helper->tagIsInvalid() documentation. --- cake/libs/view/helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cake/libs/view/helper.php b/cake/libs/view/helper.php index 734f7e8bc..87e88e315 100644 --- a/cake/libs/view/helper.php +++ b/cake/libs/view/helper.php @@ -573,13 +573,13 @@ class Helper extends Overloadable { } /** - * Returns false if given FORM field has no errors. Otherwise it returns the constant set in + * Returns null if given FORM field has no errors. Otherwise it returns the constant set in * the array Model->validationErrors. * * @param string $model Model name as a string * @param string $field Fieldname as a string * @param integer $modelID Unique index identifying this record within the form - * @return boolean True on errors. + * @return mixed Null if no errors, string with error otherwhise. */ function tagIsInvalid($model = null, $field = null, $modelID = null) { $view =& ClassRegistry::getObject('view');