mirror of
https://github.com/smarty-php/smarty.git
synced 2026-02-07 07:44:28 +01:00
fix bug when comparing array-keys to "selected" in html_options and
html_checkboxes in_array() uses "strict" comparason now.
This commit is contained in:
@@ -122,7 +122,7 @@ function smarty_function_html_checkboxes_output($name, $value, $output, $selecte
|
||||
. smarty_function_escape_special_chars($name) . '[]" value="'
|
||||
. smarty_function_escape_special_chars($value) . '"';
|
||||
|
||||
if (in_array($value, $selected)) {
|
||||
if (in_array($value, $selected, true)) {
|
||||
$_output .= ' checked="checked"';
|
||||
}
|
||||
$_output .= $extra . ' />' . $output;
|
||||
|
||||
Reference in New Issue
Block a user