Skip to content

Commit

Permalink
Fixes #5090 - default value can now be set if the value is 0 or empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
CaMer0n committed Oct 16, 2023
1 parent 1a8fb98 commit 322eaa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion e107_handlers/form_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -6519,7 +6519,7 @@ public function renderElement($key, $value, $attributes, $required_data = array(
$key .= '[' . e_LANGUAGE . ']';
}

if(empty($value) && !empty($parms['default']) && $attributes['type'] !== 'dropdown') // Allow writeParms to set default value.
if(empty($value) && isset($parms['default']) && $attributes['type'] !== 'dropdown') // Allow writeParms to set default value.
{
$value = $parms['default'];
}
Expand Down

0 comments on commit 322eaa9

Please sign in to comment.