From c46303c0e6e3a404a6446d25a4345ffb85871ae4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 May 2022 10:47:31 +0200 Subject: [PATCH] Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop --- htdocs/compta/bank/line.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/bank/line.php b/htdocs/compta/bank/line.php index 58f2dc56474..033ad7ef30e 100644 --- a/htdocs/compta/bank/line.php +++ b/htdocs/compta/bank/line.php @@ -125,7 +125,11 @@ if ($user->rights->banque->modifier && $action == "update") { $error = 0; $acline = new AccountLine($db); - $acline->fetch($rowid); + $result = $acline->fetch($rowid); + if ($result <= 0) { + dol_syslog('Failed to read bank line with id '.$rowid, LOG_ERR); // This happens due to old bug that has set fk_account to null. + $acline->id = $rowid; + } $acsource = new Account($db); $acsource->fetch($accountoldid);