diff options
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/input/checkboxes.php | 5 | ||||
-rw-r--r-- | views/default/input/radio.php | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php index 088a97709..dfab90a0a 100644 --- a/views/default/input/checkboxes.php +++ b/views/default/input/checkboxes.php @@ -49,9 +49,8 @@ if ($options) { // ignores the label (because it's just the index) and sets the value ($option) // as the label. // Wow. - $labelint = (int) $label; - - if ("{$label}" == "{$labelint}") { + // @todo deprecate in Elgg 1.8 + if (is_integer($label)) { $label = $option; } diff --git a/views/default/input/radio.php b/views/default/input/radio.php index fe7335b8a..8520b2b83 100644 --- a/views/default/input/radio.php +++ b/views/default/input/radio.php @@ -30,11 +30,13 @@ foreach($vars['options'] as $label => $option) { } else { $selected = "checked = \"checked\""; } - $labelint = (int) $label; - if ("{$label}" == "{$labelint}") { + + // handle indexed array where label is not specified + // @todo deprecate in Elgg 1.8 + if (is_integer($label)) { $label = $option; } - + if (isset($vars['internalid'])) { $id = "id=\"{$vars['internalid']}\""; } |