Fix bugs reported by scrutinizer
This commit is contained in:
parent
1838670e31
commit
49f5ec6b52
@ -153,6 +153,7 @@ class Invoices extends DolibarrApi
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
$i=0;
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
while ($i < min($num, ($limit <= 0 ? $num : $limit)))
|
while ($i < min($num, ($limit <= 0 ? $num : $limit)))
|
||||||
{
|
{
|
||||||
@ -278,7 +279,7 @@ class Invoices extends DolibarrApi
|
|||||||
/**
|
/**
|
||||||
* Validate fields before create or update object
|
* Validate fields before create or update object
|
||||||
*
|
*
|
||||||
* @param array $data Datas to validate
|
* @param array|null $data Datas to validate
|
||||||
* @return array
|
* @return array
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
@ -293,4 +294,5 @@ class Invoices extends DolibarrApi
|
|||||||
}
|
}
|
||||||
return $invoice;
|
return $invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -153,6 +153,7 @@ class SupplierInvoices extends DolibarrApi
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
$i = 0;
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
while ($i < min($num, ($limit <= 0 ? $num : $limit)))
|
while ($i < min($num, ($limit <= 0 ? $num : $limit)))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -326,7 +326,6 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
{
|
{
|
||||||
$idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det');
|
$idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det');
|
||||||
|
|
||||||
var_dump($this->lines[$i]);exit;
|
|
||||||
$this->updateline(
|
$this->updateline(
|
||||||
$idligne,
|
$idligne,
|
||||||
$this->lines[$i]->description,
|
$this->lines[$i]->description,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user