diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index 6ee02c111c4..5b802fc8e2c 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -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)