Code more robust when fk_account has been corrupted
This commit is contained in:
parent
fc33aa854e
commit
1768c3d926
@ -125,7 +125,11 @@ if ($user->rights->banque->modifier && $action == "update") {
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$acline = new AccountLine($db);
|
$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_WARNING); // This happens due to old bug that has set fk_account to null.
|
||||||
|
$acline->id = $rowid;
|
||||||
|
}
|
||||||
|
|
||||||
$acsource = new Account($db);
|
$acsource = new Account($db);
|
||||||
$acsource->fetch($accountoldid);
|
$acsource->fetch($accountoldid);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user