Fix phan notice by verifying value is array
This commit is contained in:
parent
e64e57716c
commit
44f4261cf9
1 changed files with 6 additions and 1 deletions
|
|
@ -8300,7 +8300,12 @@ abstract class CommonObject
|
|||
$value = '<span class="opacitymedium">'.$langs->trans("Encrypted").'</span>';
|
||||
//$value = preg_replace('/./i', '*', $value);
|
||||
} elseif ($type == 'array') {
|
||||
$value = implode('<br>', $value);
|
||||
if (is_array($value)) {
|
||||
$value = implode('<br>', $value);
|
||||
} else {
|
||||
dol_syslog(__METHOD__.' Expected array from dol_eval, but got '.gettype($value), LOG_ERR);
|
||||
return 'Error unexpected result from code evaluation';
|
||||
}
|
||||
} else { // text|html|varchar
|
||||
$value = dol_htmlentitiesbr($value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue