From 0e12931d0fc0e988111f7711c4ff0c897482fce7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 15 Oct 2012 21:43:42 +0200 Subject: [PATCH] Fix: error management --- htdocs/adherents/card_subscriptions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index d7b4390890e..3adbc7a2e88 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -400,12 +400,16 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ if (! $error) { $bank_line_id=$paiement->addPaymentToBank($user,'payment','(SubscriptionPayment)',$accountid,$emetteur_nom,$emetteur_banque); - if (! $bank_line_id > 0) + if (! ($bank_line_id > 0)) { $errmsg=$paiement->error; + $errmsgs=$paiement->errors; $error++; } + } + if (! $error) + { // Update fk_bank for subscriptions $sql = 'UPDATE '.MAIN_DB_PREFIX.'cotisation SET fk_bank='.$bank_line_id; $sql.= ' WHERE rowid='.$crowid;