More robust code

This commit is contained in:
Laurent Destailleur 2018-01-12 15:23:56 +01:00
parent 64ae70d106
commit ac8a7f064a

View File

@ -398,6 +398,7 @@ class BlockedLog
$totalamount += $amount;
$tmpobject = null;
if ($this->element == 'payment_supplier')
{
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';
$tmpobject = new Don($this->db);
}
if (! is_object($tmpobject))
{
continue;
}
$result = $tmpobject->fetch($objid);
if ($result <= 0)