1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 19:44:09 +02:00

Issue #4609 - Was still failing in earlier PHP versions. More tests added. 'empty' attribute added to news_render_type

This commit is contained in:
Cameron
2021-11-04 13:58:05 -07:00
parent 54cb89b87d
commit 35808e5eb9
3 changed files with 61 additions and 12 deletions

View File

@@ -3488,9 +3488,15 @@ var_dump($select_options);*/
$opts = $options;
if($selected === array(0=>'')) // quick fix. @see github issue #4609
if(isset($options['empty']) && (empty($selected) || $selected === array(0=>'')))
{
$selected = 0;
$selected = $options['empty'];
}
if($selected === array(0=>'') ) // quick fix. @see github issue #4609
{
// $selected = 0;
}
foreach ((array) $option_array as $value => $label)
@@ -6746,7 +6752,7 @@ var_dump($select_options);*/
$eloptions['multiple'] = true;
}
unset($parms['__options']);
if(!empty($eloptions['multiple']) && !is_array($value) && !empty($value))
if(!empty($eloptions['multiple']) && !is_array($value))
{
$value = explode(',', $value);
}