Skip to content
Permalink
Browse files

Fixing php4 compatibility and errors from array to string conversion.

  • Loading branch information...
markstory committed Jan 26, 2010
1 parent 16eaa99 commit 9cbb9d193aca9cf96cfd927e750401ad9b4f8334
Showing with 4 additions and 1 deletion.
  1. +4 −1 cake/libs/view/helpers/form.php
@@ -1721,7 +1721,10 @@ function __selectOptions($elements = array(), $selected = null, $parents = array
}
if ($name !== null) {
if ((!$selectedIsEmpty && (string)$selected == (string)$name) || ($selectedIsArray && in_array($name, $selected))) {
if (
(!$selectedIsArray && !$selectedIsEmpty && (string)$selected == (string)$name) ||
($selectedIsArray && in_array($name, $selected))
) {
if ($attributes['style'] === 'checkbox') {
$htmlOptions['checked'] = true;
} else {

0 comments on commit 9cbb9d1

Please sign in to comment.
You can’t perform that action at this time.