From 8e9a7cb62940341b35f7d50f6338b36dc36cee35 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Jul 2016 11:20:09 +0200 Subject: [PATCH] Fix var not always defined --- htdocs/adherents/class/cotisation.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/class/cotisation.class.php b/htdocs/adherents/class/cotisation.class.php index 786ba79c7f3..9fe26727c25 100644 --- a/htdocs/adherents/class/cotisation.class.php +++ b/htdocs/adherents/class/cotisation.class.php @@ -190,11 +190,12 @@ class Cotisation extends CommonObject */ function delete($user) { + $accountline=new AccountLine($this->db); + // It subscription is linked to a bank transaction, we get it - if ($this->fk_bank) + if ($this->fk_bank > 0) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; - $accountline=new AccountLine($this->db); $result=$accountline->fetch($this->fk_bank); }