Bug 40026: (QA follow-up): Only compare string if defined

prove /kohadevbox/koha/t/db_dependent/Koha/ILL/Requests.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Pedro Amorim 2025-08-01 15:55:16 +00:00 committed by Lucas Gass
parent 3449cb8eee
commit cb074686b8
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 4 additions and 2 deletions

View File

@ -1161,8 +1161,10 @@ sub expand_template {
my ( $self, $params ) = @_;
my $backend = $self->_backend->name;
if ( $backend eq 'Standard'
|| ( $params->{method} eq 'edititem' && C4::Context->preference("AutoILLBackendPriority") ) )
if (
$backend eq 'Standard'
|| ( $params->{method} && $params->{method} eq 'edititem' && C4::Context->preference("AutoILLBackendPriority") )
)
{
my $template_name = 'ill/backends/Standard/' . ( $params->{method} // q{} ) . '.inc';