Bugzilla – Attachment 102229 Details for
Bug 22778
Suggestions with no "suggester" can cause errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22778: Suggestions with no "suggester" can cause errors
Bug-22778-Suggestions-with-no-suggester-can-cause-.patch (text/plain), 1.37 KB, created by
Kyle M Hall (khall)
on 2020-04-01 15:11:30 UTC
(
hide
)
Description:
Bug 22778: Suggestions with no "suggester" can cause errors
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-04-01 15:11:30 UTC
Size:
1.37 KB
patch
obsolete
>From 9fed13194c321dfe19a10372546412b42cf9b00b Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 25 Apr 2019 15:50:35 -0400 >Subject: [PATCH] Bug 22778: Suggestions with no "suggester" can cause errors > >If one tries to modify a suggestion that has no suggester you will get the following error: > >Can't call method "lang" on an undefined value at /usr/share/koha/lib/C4/Suggestions.pm line 506 > >Koha assumes that every suggestion has a borrowernumber in suggestedby > >Test Plan: >1) Create a suggestion with an unpopulated suggestedby >2) Attempt to modify that suggestion >3) Note the error >4) Apply this patch >5) Restart all teh things >6) Attempt to modify that suggestion >7) No error! >--- > C4/Suggestions.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm >index 8d5336063c..43ffe506e9 100644 >--- a/C4/Suggestions.pm >+++ b/C4/Suggestions.pm >@@ -531,7 +531,9 @@ sub ModSuggestion { > > # fetch the entire updated suggestion so that we can populate the letter > my $full_suggestion = GetSuggestion( $suggestion->{suggestionid} ); >+ > my $patron = Koha::Patrons->find( $full_suggestion->{suggestedby} ); >+ return unless $patron; > > my $transport = (C4::Context->preference("FallbackToSMSIfNoEmail")) && ($patron->smsalertnumber) && (!$patron->email) ? 'sms' : 'email'; > >-- >2.24.1 (Apple Git-126)
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 22778
:
88816
|
102229
|
102426
|
102581
|
102582
|
102611
|
102612