Fix: Error management

This commit is contained in:
Laurent Destailleur 2012-01-11 01:52:22 +01:00
parent f16206070d
commit 6fe812570e

View File

@ -290,21 +290,24 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $
$sql ="UPDATE ".MAIN_DB_PREFIX."cotisation SET fk_bank=".$insertid; $sql ="UPDATE ".MAIN_DB_PREFIX."cotisation SET fk_bank=".$insertid;
$sql.=" WHERE rowid=".$crowid; $sql.=" WHERE rowid=".$crowid;
dol_syslog("Adherent::cotisation sql=".$sql); dol_syslog("card_subscriptions::cotisation sql=".$sql);
$resql = $db->query($sql); $resql = $db->query($sql);
if (! $resql) if (! $resql)
{ {
$error=$db->lasterror(); $error++;
$errmsg=$db->lasterror();
} }
} }
else else
{ {
$error=$acct->error; $error++;
$errmsg=$acct->error;
} }
} }
else else
{ {
$error=$acct->error; $error++;
$errmsg=$acct->error;
} }
} }