Fix: Renvoi chaine qd un chaine est attendue et tableau qd tableau attendu
This commit is contained in:
parent
c1a2342e3a
commit
61baa919ed
@ -3809,8 +3809,8 @@ function dol_genbarcode($code,$encoding,$generator=1,$readable='Y')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Retourne un tableau des mois ou le mois sélectionné
|
\brief Retourne un tableau des mois ou le mois sélectionné
|
||||||
\param Mois sélectionné
|
\param selected Mois à sélectionner ou -1
|
||||||
\return month
|
\return string or array Month string or array if selected < 0
|
||||||
*/
|
*/
|
||||||
function monthArrayOrSelected($selected=0)
|
function monthArrayOrSelected($selected=0)
|
||||||
{
|
{
|
||||||
@ -3829,17 +3829,23 @@ function monthArrayOrSelected($selected=0)
|
|||||||
11 => $langs->trans("November"),
|
11 => $langs->trans("November"),
|
||||||
12 => $langs->trans("December")
|
12 => $langs->trans("December")
|
||||||
);
|
);
|
||||||
if ($selected)
|
|
||||||
|
if ($selected >=0)
|
||||||
{
|
{
|
||||||
|
$return='';
|
||||||
foreach ($month as $key => $val)
|
foreach ($month as $key => $val)
|
||||||
{
|
{
|
||||||
if ($selected == $key)
|
if ($selected == $key)
|
||||||
{
|
{
|
||||||
$month = $val;
|
$return = $val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return $month;
|
return $month;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user