Bug 8299 - overdue_notice.pl shows warning messages
Summary: overdue_notice.pl shows warning messages
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nikhil
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-23 11:48 UTC by Nikhil
Modified: 2014-05-26 21:05 UTC (History)
4 users (show)

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


Attachments
Bug 8299 - overdue_notice.pl shows error messages (1.89 KB, patch)
2012-12-11 13:48 UTC, Mason James
Details | Diff | Splinter Review
Bug 8299 - overdue_notice.pl shows error messages (1.68 KB, patch)
2012-12-11 13:52 UTC, Mason James
Details | Diff | Splinter Review
Bug 8299 - overdue_notice.pl shows error messages (1.67 KB, patch)
2012-12-21 15:57 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 8299 - overdue_notice.pl shows error messages (1.73 KB, patch)
2012-12-26 10:31 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nikhil 2012-06-23 11:48:58 UTC
I am installed koha 3.8.2 in Ubuntu lucid OS.When I run overdue_notices.pl with some overdue items got this error message.


Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 659.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl
line 670.
No letter_code at /usr/share/koha/bin/cronjobs/overdue_notices.pl line 686.
Comment 1 Mason James 2012-12-11 13:48:19 UTC Comment hidden (obsolete)
Comment 2 Mason James 2012-12-11 13:52:08 UTC Comment hidden (obsolete)
Comment 3 Mason James 2012-12-11 13:57:24 UTC
(In reply to comment #2)
> Created attachment 13997 [details] [review]
> Bug 8299 - overdue_notice.pl shows error messages
> 
> fixes 2 warnings...


how to test?

run 'perl ./overdue_notice.pl -t' before and after applying patch

no warnings should occur after patch is applied
(patch applied to master 5d92ab39a681)
Comment 4 Kyle M Hall 2012-12-21 15:57:26 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2012-12-26 10:30:08 UTC
QA Comments:

On a technical point of view this patch is good because it tests if the variable is defined before passing it to a regexp.
But the content of a letter should be defined.

I think the real error is the last line of the log: No letter_code at /usr/share/koha/bin/cronjobs/overdue_notices.pl line 686.

So there is no letter defined for this overdue.

Marked as Passed QA.
Comment 6 Jonathan Druart 2012-12-26 10:30:52 UTC
It is a patch for master
Comment 7 Jonathan Druart 2012-12-26 10:31:29 UTC
Created attachment 14259 [details] [review]
Bug 8299 - overdue_notice.pl shows error messages

fixes 2 warnings...

 Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl line 659.
 Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl line 670.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 8 Jared Camins-Esakov 2012-12-27 23:51:04 UTC
This patch has been pushed to master.
Comment 9 Chris Cormack 2013-01-01 18:17:15 UTC
Pushed to 3.10.x and 3.8.x will be in 3.10.2 and 3.8.9