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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2025-11-06 09:33:48 +01:00 committed by Lucas Gass
parent 2a3c21f0d5
commit ce474740a2
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 3 additions and 2 deletions

View File

@ -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';