Bug 5603

Summary: advance_notices.pl generating "uninitialized value in hash element"
Product: Koha Reporter: Ian Walls <koha.sekjal>
Component: NoticesAssignee: Ian Walls <koha.sekjal>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: chris, nengard
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: patch

Description Ian Walls 2011-01-11 03:12:16 UTC
When running advance_notices.pl, numerous lines of the following are generated:

Use of uninitialized value in hash element at /home/koha/kohaclone/C4/Members/Messaging.pm line 101.

Investigation shows this is due to the SQL in GetMessagingPreferences returning null values for message_transport_type for advanced messaging types NOT utilized by patrons.

The solution is to change the LEFT JOIN on line 77 to JOIN; this eliminates the NULL entries.  Apparently, the patch for bug 4254 didn't factor in that NULL values would be returned now that the duplicate columns were eliminated.
Comment 1 Nicole C. Engard 2011-01-11 15:37:03 UTC
Created attachment 2972 [details] [review]
patch
Comment 2 Chris Cormack 2011-01-11 20:00:52 UTC
Pushed, please test
Comment 3 MJ Ray (software.coop) 2011-02-06 11:13:57 UTC
This bug is mentioned in:
Bug 5603: advance_notice.pl	uninitialized element in hash http://lists.koha-community.org/pipermail/koha-patches/2011-January/013574.html
Comment 4 Ian Walls 2011-03-10 15:08:31 UTC
Tested, works.