Bug 11135 - Parsing of OVERRIDE_SYSPREF_NAMES logs warnings
Summary: Parsing of OVERRIDE_SYSPREF_NAMES logs warnings
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Colin Campbell
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-24 15:56 UTC by Colin Campbell
Modified: 2014-05-26 21:04 UTC (History)
2 users (show)

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


Attachments
Proposed patch (1.00 KB, patch)
2013-10-24 16:09 UTC, Colin Campbell
Details | Diff | Splinter Review
Bug 11135 Check variable exists before splitting (1.10 KB, patch)
2013-10-31 12:02 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Campbell 2013-10-24 15:56:40 UTC
The recently added environment variable OVERRIDE_SYSPREF_NAMES is parsed using split but most of the time we're splitting an undefined variable. This fills the error log with warnings, so we should check theres something to split before executing it
Comment 1 Colin Campbell 2013-10-24 16:09:09 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2013-10-31 12:02:12 UTC
Created attachment 22632 [details] [review]
Bug 11135 Check variable exists before splitting

calling split on an undefined var generates warning to
the log. Lets check it exists before processing it

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2013-10-31 12:03:42 UTC
As an exception to the rule, I take the liberty to sign off and pass qa in one run. This is a trivial patch that eliminates just another warning from the logs.
Good catch.
Comment 4 Galen Charlton 2013-10-31 14:26:53 UTC
Pushed to master, along with a pendantic follow-up.  Thanks, Colin!

I sure wish there were a less verbose way to simultaneously check that a hash key is present and that the value of it is defined, but c'est la vie.