More robust code
This commit is contained in:
parent
64ae70d106
commit
ac8a7f064a
@ -398,6 +398,7 @@ class BlockedLog
|
|||||||
|
|
||||||
$totalamount += $amount;
|
$totalamount += $amount;
|
||||||
|
|
||||||
|
$tmpobject = null;
|
||||||
if ($this->element == 'payment_supplier')
|
if ($this->element == 'payment_supplier')
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
@ -413,6 +414,10 @@ class BlockedLog
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||||
$tmpobject = new Don($this->db);
|
$tmpobject = new Don($this->db);
|
||||||
}
|
}
|
||||||
|
if (! is_object($tmpobject))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$result = $tmpobject->fetch($objid);
|
$result = $tmpobject->fetch($objid);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user