cakephp2-php8/lib/Cake/View/Helper
aread22 64bb74a7e8 Potential Fix for LightHouse Ticket #3936
I believe I found a fix for this issue. I am here at #CakeFest2013 and during the #HourOfContribution I ran across this issue.

Currently in CakePHP 2.4 on Line 1522 - 1524 you can see the following code:

@@@ php
if ($label) {
	$optTitle = $this->Html->useTag('label', $tagName, '', $optTitle);
}
@@@

The $label variable here the is the $label array passed into the input method in Sethathi example above. The problem is that the $label array is completely ignored and instead a label is created using the HtmlHelper->useTag method.

I have what I believe is a fix for this issue but it hasn't been extensively tested. I tested against Sethathi example in the ticket and it produced the correct result.

The fix is simple. We detect if an array is passed in and then send it to the FormHelper label method instead of the HtmlHelper useTag method. The FormHelper label methods accepts an options array, so we pass in the $label array.

This will probably need to be fixed for checkbox also

"ask":https://cakephp.lighthouseapp.com/users/235987 helped me with this fix
2013-09-01 20:56:44 -04:00
..
CacheHelper.php Docblock and return type fixes 2013-07-29 19:13:31 +05:30
FormHelper.php Potential Fix for LightHouse Ticket #3936 2013-09-01 20:56:44 -04:00
HtmlHelper.php Correctly encode confirm handlers 2013-08-13 10:11:22 +02:00
JqueryEngineHelper.php coding standards and simplification of else cases as well as some minor fixes 2013-07-03 00:52:48 +02:00
JsBaseEngineHelper.php coding standards and simplification of else cases as well as some minor fixes 2013-07-03 00:52:48 +02:00
JsHelper.php remove undocumented code and uncessary in_array() checks + cleanup 2013-08-08 03:56:58 +02:00
MootoolsEngineHelper.php remove code, class names and paths from translation strings. 2013-08-21 00:05:53 +02:00
NumberHelper.php Adds option to multiply decimal percentages. Fixes #3814 2013-07-10 14:37:57 +02:00
PaginatorHelper.php remove code, class names and paths from translation strings. 2013-08-21 00:05:53 +02:00
PrototypeEngineHelper.php coding standards and simplification of else cases as well as some minor fixes 2013-07-03 00:52:48 +02:00
RssHelper.php unify null checks - avoid method call in favor of strict check 2013-08-16 20:12:49 +02:00
SessionHelper.php Improved the DocBlocks and other code cleanup 2013-05-31 00:11:19 +02:00
TextHelper.php Merge branch 'master' into 2.4 2013-06-16 13:07:44 +05:30
TimeHelper.php remove undocumented code and uncessary in_array() checks + cleanup 2013-08-08 03:56:58 +02:00