Bugzilla – Attachment 80326 Details for
Bug 21530
overdue_notices.pl aborting because error is not caught
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to test a valid object returned
0001-Bug-21530-Test-return-from-Libraries-lookup.patch (text/plain), 1.11 KB, created by
Colin Campbell
on 2018-10-10 10:55:55 UTC
(
hide
)
Description:
Patch to test a valid object returned
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2018-10-10 10:55:55 UTC
Size:
1.11 KB
patch
obsolete
>From dfbb40ed69a28b512a617b88933a150ccfd77264 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Wed, 10 Oct 2018 11:44:05 +0100 >Subject: [PATCH] Bug 21530 Test return from Libraries lookup > >If library lookup failed process aborts when methods >called on null return. >Test return - if null continue processing remaining libraries >output error indicating branchcode that triggered error >--- > misc/cronjobs/overdue_notices.pl | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 8c42335c2c..8dc6f67228 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -453,6 +453,10 @@ foreach my $branchcode (@branches) { > } > > my $library = Koha::Libraries->find($branchcode); >+ if (!$library) { >+ warn "Unable to locate library for $branchcode skipping"; >+ next; >+ } > my $admin_email_address = $library->branchemail > || C4::Context->preference('KohaAdminEmailAddress'); > my @output_chunks; # may be sent to mail or stdout or csv file. >-- >2.17.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21530
: 80326