Bug 25026: Turn on RaiseError
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 30 Nov 2020 14:30:45 +0000 (15:30 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 9 Feb 2021 09:20:49 +0000 (10:20 +0100)
commitde14c96249e648c29aecbf759413c3c7ec094d18
treeddce940e363afcb223812bc56259dcb0fcd98441
parent91ddddd8ebefaeb079b093ae71fb02bc5481fec7
Bug 25026: Turn on RaiseError

This is a follow-up for bug 22001.

The patch "Bug 22001: Set unsafe only if RaiseError is not set" proved that
unsafe => 1 and RaiseError => 0 was wrong.
We should move forward and turn RaiseError for the UI, and... see what's happening.
The change goes to the right direction, but we need to know how big is the task
to have a stable release with these parameters correctly set.

We will have a lot of fun once this patch is pushed! :)

Test plan:
0. Does not apply the patch
1. Add, somewhere in mainpage.pl
  C4::Acquisition::NewBasket();
2. restart_all
3. Hit the mainpage
=> Hum... nothing happens! However there is an error in the logs
 DBI Exception: DBD::mysql::db do failed: Column 'booksellerid' cannot be null
No basket has been created!
4. Apply the patch, restart_all
5. Hit the mainpage
=> Here we go, there was something wrong and the user is aware of that!

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Database.pm