mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixing php4 compatibility and errors from array to string conversion.
This commit is contained in:
parent
16eaa990df
commit
9cbb9d193a
1 changed files with 4 additions and 1 deletions
|
@ -1721,7 +1721,10 @@ class FormHelper extends AppHelper {
|
|||
}
|
||||
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue