From 86456aadaa004f86bcc6d84dfc8ad9d35ed519d9 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 6 Nov 2025 09:33:48 +0100 Subject: [PATCH] Bug 39860: Fix selenium/opac_holds.t # Failed test 'Correctly in search results page' # at t/db_dependent/selenium/opac_holds.t line 88. # 'Error: Can't use an undefined value as a HASH reference at /kohadevbox/koha/C4/XSLT.pm line 247' # doesn't match '(?^u:Results of search for 'opac holds test place hold button')' might be a conflict with bug 40943 --- C4/XSLT.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 467bbd1ada3..a2d212fe138 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -244,8 +244,9 @@ sub XSLTParse4Display { } my $extracontent = ''; my $location; - my $branch = C4::Context->userenv->{branch} || ''; - my $lang = C4::Languages::getlanguage; + my $branch = C4::Context->userenv && C4::Context->userenv->{branch}; + $branch //= ''; + my $lang = C4::Languages::getlanguage; if ( $xslsyspref eq "XSLTDetailsDisplay" ) { $location = 'StaffDetailPage'; -- 2.34.1