Bugzilla – Attachment 184087 Details for
Bug 40388
t/Labels.t generates a warning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40388: Remove warning from t/Labels.t
Bug-40388-Remove-warning-from-tLabelst.patch (text/plain), 1.66 KB, created by
Jonathan Druart
on 2025-07-15 12:49:28 UTC
(
hide
)
Description:
Bug 40388: Remove warning from t/Labels.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-15 12:49:28 UTC
Size:
1.66 KB
patch
obsolete
>From 1b812b56a3be176a04cfb2eb537bb93d085cf133 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 15 Jul 2025 14:48:39 +0200 >Subject: [PATCH] Bug 40388: Remove warning from t/Labels.t > >Use of uninitialized value $cn_item in sprintf at /kohadevbox/koha/C4/ClassSplitRoutine/LCC.pm line 53. >--- > C4/ClassSplitRoutine/LCC.pm | 2 +- > t/Labels.t | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/ClassSplitRoutine/LCC.pm b/C4/ClassSplitRoutine/LCC.pm >index 12901ba3e39..a2ee632960e 100644 >--- a/C4/ClassSplitRoutine/LCC.pm >+++ b/C4/ClassSplitRoutine/LCC.pm >@@ -46,7 +46,7 @@ sub split_callnumber { > # lccn examples: 'HE8700.7 .P6T44 1983', 'BS2545.E8 H39 1996'; > my @lines = Library::CallNumber::LC->new($cn_item)->components(); > unless ( scalar @lines && defined $lines[0] ) { >- Koha::Logger->get->debug( sprintf( 'regexp failed to match string: %s', $cn_item ) ); >+ Koha::Logger->get->debug( sprintf( 'regexp failed to match string: %s', $cn_item // q{} ) ); > @lines = $cn_item; # if no match, just use the whole string. > } > my $LastPiece = pop @lines; >diff --git a/t/Labels.t b/t/Labels.t >index 1a5d8b53b1f..5facaaed78a 100755 >--- a/t/Labels.t >+++ b/t/Labels.t >@@ -17,11 +17,11 @@ > # > # for context, see http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=2691 > >-use strict; >-use warnings; >+use Modern::Perl; > > use C4::ClassSplitRoutine::LCC qw( split_callnumber ); >-use Test::More tests => 11; >+use Test::More tests => 12; >+use Test::NoWarnings; > > BEGIN { > use_ok( 'C4::Labels::Label', qw( _get_text_fields _check_params _guide_box ) ); >-- >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 40388
: 184087