fix php warning introduce by 97eedb866b

urlencode cannot deal with array
This commit is contained in:
florian HENRY 2016-07-07 09:47:12 +02:00
parent 63ad970a27
commit 240dcc78fb

View File

@ -1482,8 +1482,10 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$qs=$_SERVER["QUERY_STRING"]; $qs=$_SERVER["QUERY_STRING"];
foreach($_POST as $key=>$value) { foreach($_POST as $key=>$value) {
if (!is_array($value)) {
if($key!=='action')$qs.='&'.$key.'='.urlencode($value); if($key!=='action')$qs.='&'.$key.'='.urlencode($value);
} }
}
$qs.=(($qs && $morequerystring)?'&':'').$morequerystring; $qs.=(($qs && $morequerystring)?'&':'').$morequerystring;
$text ='<a href="'.$_SERVER["PHP_SELF"].'?'.$qs.($qs?'&':'').'optioncss=print" target="_blank">'; $text ='<a href="'.$_SERVER["PHP_SELF"].'?'.$qs.($qs?'&':'').'optioncss=print" target="_blank">';