diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 94885ab118b..e53e66c51f6 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -122,6 +122,12 @@ if ($id > 0 || ! empty($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; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('banktransactionlist', $contextpage));