mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 23:52:24 +01:00
FIX: Variable might not be traversable
This commit is contained in:
committed by
Raphaël Doursenaud
parent
f68cb3bfcb
commit
eea9a76589
@@ -1302,14 +1302,17 @@ class Form
|
||||
$assignedtouser=array();
|
||||
if (!empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true);
|
||||
if (count($assignedtouser)) $out.='<br>';
|
||||
foreach($assignedtouser as $key => $value)
|
||||
{
|
||||
$userstatic->fetch($key);
|
||||
$out.=$userstatic->getNomUrl(1);
|
||||
//$out.=' '.($value['mandatory']?$langs->trans("Mandatory"):$langs->trans("Optional"));
|
||||
//$out.=' '.($value['transparency']?$langs->trans("Busy"):$langs->trans("NotBusy"));
|
||||
$out.='<br>';
|
||||
}
|
||||
// dol_json_decode may return false on error which is not traversable
|
||||
if (is_array($assignedtouser)) {
|
||||
foreach($assignedtouser as $key => $value)
|
||||
{
|
||||
$userstatic->fetch($key);
|
||||
$out.=$userstatic->getNomUrl(1);
|
||||
//$out.=' '.($value['mandatory']?$langs->trans("Mandatory"):$langs->trans("Optional"));
|
||||
//$out.=' '.($value['transparency']?$langs->trans("Busy"):$langs->trans("NotBusy"));
|
||||
$out.='<br>';
|
||||
}
|
||||
}
|
||||
|
||||
//$out.='</form>';
|
||||
return $out;
|
||||
|
||||
Reference in New Issue
Block a user