Bugzilla – Attachment 182825 Details for
Bug 40020
Koha/AdditionalContents.t produces warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40020: Remove warnings from Koha/AdditionalContents.t
Bug-40020-Remove-warnings-from-KohaAdditionalConte.patch (text/plain), 1.48 KB, created by
Jonathan Druart
on 2025-05-28 14:52:11 UTC
(
hide
)
Description:
Bug 40020: Remove warnings from Koha/AdditionalContents.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-05-28 14:52:11 UTC
Size:
1.48 KB
patch
obsolete
>From 64cc3f9e7f12b0e320c6d321d5e11a79661f82c9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 28 May 2025 16:51:37 +0200 >Subject: [PATCH] Bug 40020: Remove warnings from Koha/AdditionalContents.t > >Test plan: > prove t/db_dependent/Koha/AdditionalContents.t >should return green >--- > Koha/AdditionalContents.pm | 2 +- > t/db_dependent/Koha/AdditionalContents.t | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/AdditionalContents.pm b/Koha/AdditionalContents.pm >index a16089e5247..917538c7bdf 100644 >--- a/Koha/AdditionalContents.pm >+++ b/Koha/AdditionalContents.pm >@@ -73,7 +73,7 @@ location is one of this: > > sub search_for_display { > my ( $self, $params ) = @_; >- my $lang = $params->{lang}; >+ my $lang = $params->{lang} || q{}; > > # If lang is not default, we will search for entries matching $lang but fallback to default if $lang is not found > # Then we need a subquery count in where clause; DBIx::Class/SQL::Abstract does not support it, fallback to literal SQL >diff --git a/t/db_dependent/Koha/AdditionalContents.t b/t/db_dependent/Koha/AdditionalContents.t >index 6fc01677c04..5ed6fea0550 100755 >--- a/t/db_dependent/Koha/AdditionalContents.t >+++ b/t/db_dependent/Koha/AdditionalContents.t >@@ -19,8 +19,9 @@ > > use Modern::Perl; > >-use Test::More tests => 7; >+use Test::More tests => 8; > use Test::Exception; >+use Test::NoWarnings; > > use Koha::AdditionalContents; > use Koha::Database; >-- >2.34.1
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 40020
:
182825
|
182877