Bugzilla – Attachment 179808 Details for
Bug 38441
Allow for an ILL 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-03-27 17:07:13 UTC
(
hide
)
Description:
Bug 38441: (QA follow-up): Handle undef userenv
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-03-27 17:07:13 UTC
Size:
1.25 KB
patch
obsolete
>From a78cfdcac54ba1bf30bd64fea2b1b233177a9043 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
|
179800
|
179801
|
179802
|
179803
|
179804
|
179805
|
179806
|
179807
|
179808
|
179809
|
179810
|
179811
|
180034
|
180035
|
180036
|
180037
|
180038
|
180039
|
180040
|
180041
|
180042
|
180043
|
180044
|
180045
|
180907
|
180908
|
180909
|
180910
|
180911
|
180912
|
180913
|
180914
|
180915
|
180916
|
180917
|
180918
|
180919
|
181072
|
181111
|
181112
|
181113
|
181114
|
181115
|
181116
|
181117
|
181118
|
181119
|
181120
|
181121
|
181122
|
181123
|
181124
|
181125
|
181126
|
181593
|
181594
|
181595
|
181596
|
181597
|
181598
|
181599
|
181600
|
181601
|
181602
|
181603
|
181604
|
181605
|
181606
|
181607