Fix phan notice by verifying value is array

This commit is contained in:
MDW 2024-04-02 23:02:05 +02:00
parent e64e57716c
commit 44f4261cf9
No known key found for this signature in database

View file

@ -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);
}