fix warnings in ticket list

This commit is contained in:
Frédéric FRANCE 2021-10-24 09:46:58 +02:00
parent f1f00be99c
commit 6b3916a7b3
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1

View File

@ -390,7 +390,7 @@ foreach ($search as $key => $val) {
}
continue;
}
$mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
$mode_search = ((!empty($object->fields[$key]) && ($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key]))) ? 1 : 0);
if ($search[$key] != '') {
$sql .= natural_search($key, $search[$key], $mode_search);
}
@ -560,7 +560,7 @@ if ($projectid > 0 || $project_ref) {
// Title
$morehtmlref .= $object->title;
// Thirdparty
if ($object->thirdparty->id > 0) {
if (!empty($object->thirdparty) && $object->thirdparty->id > 0) {
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project');
}
$morehtmlref .= '</div>';