From 5c01ec158de1af59214aa9ebc219c575078b248b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Feb 2019 15:40:33 +0100 Subject: [PATCH] Fix regression --- htdocs/compta/bank/bankentries_list.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index edd0f35c442..ece5a6580de 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -120,14 +120,15 @@ if ($id > 0 || ! empty($ref)) { $result=$object->fetch($id, $ref); $search_account = $object->id; // Force the search field on id of account + + if (! ($object->id > 0) ) + { + $langs->load("errors"); + print($langs->trans('ErrorRecordNotFound')); + exit; + } } -if (! ($object->id > 0) ) -{ - $langs->load("errors"); - print($langs->trans('ErrorRecordNotFound')); - exit; -} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('banktransactionlist', $contextpage));