31if (($id > 0 || (!empty($ref) && !in_array($action, array(
'create',
'createtask',
'add')))) && (empty($cancel) || $id > 0)) {
32 if (($id > 0 && is_numeric($id)) || !empty($ref)) {
33 if ($object->element ==
'usergroup') {
34 $ret = $object->fetch($id, (empty($ref) ?
'' : $ref), true);
36 $ret = $object->fetch($id, (empty($ref) ?
'' : $ref));
39 $object->fetch_thirdparty();
42 if (empty($object->error) && !count($object->errors)) {
44 setEventMessages(
'Fetch on object (type '.get_class($object).
') return an error without filling $object->error nor $object->errors',
null,
'errors');
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.