Fix PHP 7.2
This commit is contained in:
parent
7d553f58f5
commit
f7b663379a
@ -223,7 +223,7 @@ if ($action=="dl" && $numref > 0)
|
|||||||
$payment = new Paiement($db);
|
$payment = new Paiement($db);
|
||||||
$payment->fetch($val['url_id']);
|
$payment->fetch($val['url_id']);
|
||||||
$arraybill = $payment->getBillsArray();
|
$arraybill = $payment->getBillsArray();
|
||||||
if (count($arraybill) > 0)
|
if (is_array($arraybill) && count($arraybill) > 0)
|
||||||
{
|
{
|
||||||
foreach ($arraybill as $billid)
|
foreach ($arraybill as $billid)
|
||||||
{
|
{
|
||||||
@ -260,7 +260,7 @@ if ($action=="dl" && $numref > 0)
|
|||||||
$payment = new PaiementFourn($db);
|
$payment = new PaiementFourn($db);
|
||||||
$payment->fetch($val['url_id']);
|
$payment->fetch($val['url_id']);
|
||||||
$arraybill = $payment->getBillsArray();
|
$arraybill = $payment->getBillsArray();
|
||||||
if (count($arraybill) > 0)
|
if (is_array($arraybill) && count($arraybill) > 0)
|
||||||
{
|
{
|
||||||
foreach ($arraybill as $billid)
|
foreach ($arraybill as $billid)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1052,7 +1052,7 @@ class Paiement extends CommonObject
|
|||||||
if ($mode == 'withlistofinvoices')
|
if ($mode == 'withlistofinvoices')
|
||||||
{
|
{
|
||||||
$arraybill = $this->getBillsArray();
|
$arraybill = $this->getBillsArray();
|
||||||
if (count($arraybill) > 0)
|
if (is_array($arraybill) && count($arraybill) > 0)
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
$facturestatic=new Facture($this->db);
|
$facturestatic=new Facture($this->db);
|
||||||
|
|||||||
@ -289,6 +289,8 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$paymentstatic->fetch($links[$key]['url_id']);
|
$paymentstatic->fetch($links[$key]['url_id']);
|
||||||
$tmparray=$paymentstatic->getBillsArray('');
|
$tmparray=$paymentstatic->getBillsArray('');
|
||||||
|
if (is_array($tmparray))
|
||||||
|
{
|
||||||
foreach($tmparray as $key => $val)
|
foreach($tmparray as $key => $val)
|
||||||
{
|
{
|
||||||
$invoicestatic->fetch($val);
|
$invoicestatic->fetch($val);
|
||||||
@ -296,10 +298,13 @@ if ($resql)
|
|||||||
$accountelem.=$invoicestatic->ref;
|
$accountelem.=$invoicestatic->ref;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
elseif ($links[$key]['type']=='payment_supplier')
|
elseif ($links[$key]['type']=='payment_supplier')
|
||||||
{
|
{
|
||||||
$paymentsupplierstatic->fetch($links[$key]['url_id']);
|
$paymentsupplierstatic->fetch($links[$key]['url_id']);
|
||||||
$tmparray=$paymentsupplierstatic->getBillsArray('');
|
$tmparray=$paymentsupplierstatic->getBillsArray('');
|
||||||
|
if (is_array($tmparray))
|
||||||
|
{
|
||||||
foreach($tmparray as $key => $val)
|
foreach($tmparray as $key => $val)
|
||||||
{
|
{
|
||||||
$invoicesupplierstatic->fetch($val);
|
$invoicesupplierstatic->fetch($val);
|
||||||
@ -307,6 +312,7 @@ if ($resql)
|
|||||||
$accountelem.=$invoicesupplierstatic->ref;
|
$accountelem.=$invoicesupplierstatic->ref;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
elseif ($links[$key]['type']=='payment_sc')
|
elseif ($links[$key]['type']=='payment_sc')
|
||||||
{
|
{
|
||||||
$paymentsocialcontributionstatic->fetch($links[$key]['url_id']);
|
$paymentsocialcontributionstatic->fetch($links[$key]['url_id']);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user