From 07190b29a0ffa194346e59bc5132523dda2025c9 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 5 Jan 2008 07:34:17 +0000 Subject: [PATCH] Form values come to PHP as strings, so default comparison should be consistent git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12855 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- templates/default/select.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/default/select.tpl b/templates/default/select.tpl index e47349c5..97e48cdf 100644 --- a/templates/default/select.tpl +++ b/templates/default/select.tpl @@ -63,7 +63,7 @@ foreach ($aValues as $key => $value) { // if ($multiple) { foreach ($default as $def) { - if ($def === $key) { + if ((string)$def == (string)$key) { echo ' selected="selected"'; break; } @@ -74,7 +74,7 @@ foreach ($aValues as $key => $value) { // (we could use the same code above, but we do this here to increase // efficency and performance) // - else if ($default[0] === $key) + else if ((string)$default[0] == (string)$key) echo ' selected="selected"'; echo '>' . $label_open . $value . $label_close . "\n"; -- 2.25.1