Merge pull request #19138 from Hystepik/scrutinizerfix

Fix : scrutinizer errors
This commit is contained in:
Laurent Destailleur 2021-10-23 11:23:13 +02:00 committed by GitHub
commit a9bba23ef5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -981,6 +981,7 @@ class Orders extends DolibarrApi
if (!DolibarrApiAccess::$user->rights->expedition->lire) {
throw new RestException(401);
}
$obj_ret = array();
$sql = "SELECT e.rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."expedition as e";
$sql .= " JOIN ".MAIN_DB_PREFIX."expeditiondet as edet";
@ -1054,7 +1055,6 @@ class Orders extends DolibarrApi
if ($result <= 0) {
throw new RestException(500, 'Error on creating expedition lines:'.$this->db->lasterror());
}
$i++;
}
return $shipment->id;
}

View File

@ -65,7 +65,7 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes
public function loadBox($max = 5)
{
global $conf, $user, $langs;
$dataseries = "";
$dataseries = array();
$graphtoshow = "";
$badgeStatus0 = '#cbd3d3'; // draft
@ -118,7 +118,6 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes
if ($resql) {
$num = $this->db->num_rows($resql);
$i = 0;
$dataseries = array();
while ($i < $num) {
$objp = $this->db->fetch_object($resql);
while ($minimumdatecformated < $objp->datec) {