Bugzilla – Attachment 176561 Details for
Bug 38441
ILL - Allow for a history check workflow stage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38441: (QA follow-up): Handle undef userenv
Bug-38441-QA-follow-up-Handle-undef-userenv.patch (text/plain), 1.25 KB, created by
Pedro Amorim
on 2025-01-15 11:34:00 UTC
(
hide
)
Description:
Bug 38441: (QA follow-up): Handle undef userenv
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-01-15 11:34:00 UTC
Size:
1.25 KB
patch
obsolete
>From 1c09ea2963a6711d4334ee316aac201f3dce7fba Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 15 Jan 2025 11:33:38 +0000 >Subject: [PATCH] Bug 38441: (QA follow-up): Handle undef userenv > >C4::Context->userenv may be undef (after a reset_all, trying to place an unauthenticated request without being logged). >This change prevents a nasty 500 error trying use undefined as hash >--- > Koha/ILL/Request/Workflow/HistoryCheck.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/ILL/Request/Workflow/HistoryCheck.pm b/Koha/ILL/Request/Workflow/HistoryCheck.pm >index 455b02cf45e..421fd01f184 100644 >--- a/Koha/ILL/Request/Workflow/HistoryCheck.pm >+++ b/Koha/ILL/Request/Workflow/HistoryCheck.pm >@@ -54,7 +54,7 @@ sub show_history_check { > > my $opac_no_matching_requests_for_patron = 0; > if ( $self->{ui_context} eq 'opac' ) { >- my $patron_cardnumber = C4::Context->userenv->{'cardnumber'} || 0; >+ my $patron_cardnumber = C4::Context->userenv ? C4::Context->userenv->{'cardnumber'} || 0 : 0; > my ( $matching_requests_for_patron, $remaining_matching_requests ) = > $self->_get_split_matching_requests($patron_cardnumber); > $opac_no_matching_requests_for_patron = 1 >-- >2.39.5
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 38441
:
174604
|
174605
|
174606
|
174607
|
174608
|
174609
|
174610
|
174611
|
175300
|
175301
|
175302
|
175303
|
175304
|
175305
|
175306
|
175307
|
176507
|
176508
|
176509
|
176510
|
176511
|
176512
|
176513
|
176514
| 176561 |
176566
|
176573
|
176829