Fix bugs reported by scrutinizer
This commit is contained in:
parent
493669e986
commit
f0c8b548f3
@ -628,7 +628,6 @@ class Setup extends DolibarrApi
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new RestException(500, $langs->trans('XmlNotFound') . ': ' . $xmlfile);
|
throw new RestException(500, $langs->trans('XmlNotFound') . ': ' . $xmlfile);
|
||||||
$error++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -646,13 +645,12 @@ class Setup extends DolibarrApi
|
|||||||
{
|
{
|
||||||
$errormsg=$langs->trans('XmlNotFound') . ': ' . $xmlremote.' - '.$xmlarray['http_code'].' '.$xmlarray['curl_error_no'].' '.$xmlarray['curl_error_msg'];
|
$errormsg=$langs->trans('XmlNotFound') . ': ' . $xmlremote.' - '.$xmlarray['http_code'].' '.$xmlarray['curl_error_no'].' '.$xmlarray['curl_error_msg'];
|
||||||
throw new RestException(500, $errormsg);
|
throw new RestException(500, $errormsg);
|
||||||
$error++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (! $error && $xml)
|
if ($xml)
|
||||||
{
|
{
|
||||||
$checksumconcat = array();
|
$checksumconcat = array();
|
||||||
$file_list = array();
|
$file_list = array();
|
||||||
@ -873,7 +871,6 @@ class Setup extends DolibarrApi
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new RestException(500, 'Error: Failed to found dolibarr_htdocs_dir into XML file '.$xmlfile);
|
throw new RestException(500, 'Error: Failed to found dolibarr_htdocs_dir into XML file '.$xmlfile);
|
||||||
$error++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3952,8 +3952,6 @@ function migrate_reset_blocked_log($db,$langs,$conf)
|
|||||||
|
|
||||||
$res = $b->create($user);
|
$res = $b->create($user);
|
||||||
if ($res<=0) {
|
if ($res<=0) {
|
||||||
$this->error = $b->error;
|
|
||||||
$this->errors = $b->errors;
|
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -480,14 +480,15 @@ $sql.= $db->plimit($limit+1, $offset);
|
|||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
if ($idproduct > 0)
|
$product = new Product($db);
|
||||||
|
$object = new Entrepot($db);
|
||||||
|
|
||||||
|
if ($idproduct > 0)
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
|
||||||
$product->fetch($idproduct);
|
$product->fetch($idproduct);
|
||||||
}
|
}
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
{
|
{
|
||||||
$object = new Entrepot($db);
|
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user