2
0
forked from Wavyzz/dolibarr

Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
This commit is contained in:
Scrutinizer Auto-Fixer
2020-10-31 13:32:18 +00:00
parent 92bdcd017d
commit 7f52920716
1177 changed files with 82257 additions and 82262 deletions

View File

@@ -34,20 +34,20 @@ if (($id > 0 || (!empty($ref) && !in_array($action, array('create', 'createtask'
{
$ret = $object->fetch($id, $ref);
if ($ret > 0)
{
$object->fetch_thirdparty();
$id = $object->id;
} else {
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 = '';
}
{
$object->fetch_thirdparty();
$id = $object->id;
} else {
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 = '';
}
}
}