if (is_array($input)) { // Note: in_array('', array(0)) returns TRUE, do not use it
foreach ($input as &
$v) { if ($value ===
$v) { return ' checked="checked"';
} } return '';
} $session = Services::
session();
$hasOldInput =
$session->
has('_ci_old_input'
);
// Unchecked checkbox and radio inputs are not even submitted by browsers ...
if ((string) $input === '0' || !
empty($request->
getPost()) ||
$hasOldInput) { return ($input ===
$value) ? ' checked="checked"' : '';
} return ($default === true
) ? ' checked="checked"' : '';
}}