If there is no error, a warning is generated with Something is wrong on line xxx. Just adding a test eliminates these fake warnings. You can test it by running the install on an empty database. Check the logfile without this patch and again with this patch.
Created attachment 4936 [details] [review] Patch
Created attachment 6194 [details] [review] Signed off patch
Simple test for display an error Marking as Passed QA
patch pushed, with a small follow-up: the fix was hidding the error message, but, if there were an SQL error, the error would hare reappeared, as warn $bla does not work
(In reply to comment #4) > patch pushed, with a small follow-up: the fix was hidding the error message, > but, if there were an SQL error, the error would hare reappeared, as warn $bla > does not work Thanks for pushing. No problem with the follow up too. I was only curious if warn $error would not work. So I tested this: my $err='a'; warn $err; warn "$err"; With the following result in the logfile: [Sat Dec 03 12:38:41 2011] [error] [client 82.173.53.17] [Sat Dec 3 12:38:41 2011] opac-main.pl: a at /usr/share/koha/testclone/opac/opac-main.pl line 31. [Sat Dec 03 12:38:41 2011] [error] [client 82.173.53.17] [Sat Dec 3 12:38:41 2011] opac-main.pl: a at /usr/share/koha/testclone/opac/opac-main.pl line 31. So I am inclined to think that the followup was not needed, since there is also a check on $error in the if-condition. But it does not hurt either!