Bug 6699

Summary: Add not-empty check for warnings from load_sql in Installer
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Installation and upgrade (web-based installer)Assignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: minor    
Priority: PATCH-Sent (DO NOT USE) CC: gmcharlt, jonathan.druart, julian.maurice, paul.poulain
Version: 3.6   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Patch
Signed off patch

Description Marcel de Rooy 2011-08-10 13:32:23 UTC
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.
Comment 1 Marcel de Rooy 2011-08-10 13:39:17 UTC Comment hidden (obsolete)
Comment 2 Julian Maurice 2011-11-04 10:32:49 UTC
Created attachment 6194 [details] [review]
Signed off patch
Comment 3 Jonathan Druart 2011-12-01 09:44:25 UTC
Simple test for display an error

Marking as Passed QA
Comment 4 Paul Poulain 2011-12-03 06:45:27 UTC
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
Comment 5 Marcel de Rooy 2011-12-03 11:58:44 UTC
(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!