From 52b17797dbd9249062e86f0f47c1f8b315765725 Mon Sep 17 00:00:00 2001 From: mohrt Date: Fri, 15 Apr 2005 16:32:30 +0000 Subject: [PATCH] cast selected value to string for comparison in html_radios --- NEWS | 2 ++ libs/plugins/function.html_radios.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b7d8add4..fb24c6b4 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - cast selected value to string for comparison in html_radios + (Exeption, monte) - updated html_select_date's year_as_text-feature to be xhtml compliant (Mark West, messju) - fix handling of selected month html_select_date (Yuri Weseman, messju) diff --git a/libs/plugins/function.html_radios.php b/libs/plugins/function.html_radios.php index dc7baee8..8ff14e99 100644 --- a/libs/plugins/function.html_radios.php +++ b/libs/plugins/function.html_radios.php @@ -137,7 +137,7 @@ function smarty_function_html_radios_output($name, $value, $output, $selected, $ if ($labels) $_output .= ' id="' . $_id . '"'; - if ($value==$selected) { + if ((string)$value==$selected) { $_output .= ' checked="checked"'; } $_output .= $extra . ' />' . $output;