diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php
index 815a5044c0..504da5d49b 100644
--- a/phpgwapi/inc/class.html.inc.php
+++ b/phpgwapi/inc/class.html.inc.php
@@ -344,15 +344,12 @@ class html
{
// the following compares strict as strings, to archive: '0' == 0 != ''
// the first non-strict search via array_search, is for performance reasons, to not always search the whole array with php
- if (($found = ($key = array_search($value,$selected)) !== false) && !$value)
+ if (($found = ($key = array_search($value,$selected)) !== false) && (string) $value !== (string) $selected[$key])
{
- if ((string) $value !== (string) $selected[$key])
+ $found = false;
+ foreach($selected as $sel)
{
- $found = false;
- foreach($selected as $sel)
- {
- if ($found = ((string) $value === (string) $selected[$key])) break;
- }
+ if ($found = (((string) $value) === ((string) $selected[$key]))) break;
}
}
return '