Commit 062412e1 authored by Gerhard Killesreiter's avatar Gerhard Killesreiter
Browse files

#58586, code simplification, patch by chx

parent b9d3b47e
......@@ -832,7 +832,7 @@ function theme_checkbox($element) {
$checkbox .= 'name="'. $element['#name'] .'" ';
$checkbox .= 'id="'. $element['#id'].'" ' ;
$checkbox .= 'value="'. $element['#return_value'] .'" ';
$checkbox .= ($element['#value'] || (string)$element['#return_value'] == (string)$element['#value']) ? ' checked="checked" ' : ' ';
$checkbox .= $element['#value'] ? ' checked="checked" ' : ' ';
$checkbox .= drupal_attributes($element['#attributes']) . ' />';
if (!is_null($element['#title'])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment