From cb056a5cbeb9760a91af229d2a6b9b95a79b50b6 Mon Sep 17 00:00:00 2001 From: aread22 Date: Wed, 4 Sep 2013 13:32:36 -0400 Subject: [PATCH] Use FormHelper->label instead of HtmlHelper->useTag Implementing suggested fix by mark_story --- lib/Cake/View/Helper/FormHelper.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 9e4d7cc71..f88b1f089 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -1520,11 +1520,7 @@ class FormHelper extends AppHelper { ); if ($label) { - if (is_array($label)) { - $optTitle = $this->label($tagName, $optTitle, $label); - } else { - $optTitle = $this->Html->useTag('label', $tagName, '', $optTitle); - } + $optTitle = $this->label($tagName, $optTitle, is_array($label) ? $label : null); } if (is_array($between)) {