better handle of errors

This commit is contained in:
Philippe GRAND 2017-11-15 11:09:18 +01:00
parent f37320590d
commit 5615416d1a

View File

@ -1525,8 +1525,8 @@ class ExpenseReport extends CommonObject
}
else
{
print $langs->trans("Error")." ".$langs->trans("Error_EXPENSEREPORT_ADDON_NotDefined");
return "";
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Error_EXPENSEREPORT_ADDON_NotDefined")), null, 'errors');
$errors++;
}
}