Bug 6699 - Add not-empty check for warnings from load_sql in Installer
Summary: Add not-empty check for warnings from load_sql in Installer
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: 3.6
Hardware: All All
: PATCH-Sent (DO NOT USE) minor
Assignee: Marcel de Rooy
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-10 13:32 UTC by Marcel de Rooy
Modified: 2012-10-25 23:09 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Patch (1.02 KB, patch)
2011-08-10 13:39 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Signed off patch (1.04 KB, patch)
2011-11-04 10:32 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!