2
0
forked from Wavyzz/dolibarr

Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/filefunc.inc.php
This commit is contained in:
Laurent Destailleur
2018-01-26 12:10:13 +01:00
2 changed files with 9 additions and 3 deletions

View File

@@ -40,7 +40,13 @@ if (($id > 0 || (! empty($ref) && ! in_array($action, array('create', 'createtas
}
else
{
if (empty($object->error) && ! count($object->errors)) setEventMessages('Fetch on object return an error without filling $object->error nor $object->errors', null, 'errors');
if (empty($object->error) && ! count($object->errors))
{
if ($ret < 0) // if $ret == 0, it means not found.
{
setEventMessages('Fetch on object (type '.get_class($object).') return an error without filling $object->error nor $object->errors', null, 'errors');
}
}
else setEventMessages($object->error, $object->errors, 'errors');
$action='';
}