From 29a1f78e589edaef4644ee945fa9507db14e6912 Mon Sep 17 00:00:00 2001 From: Charles Farmer Date: Fri, 15 Jul 2016 16:06:12 -0400 Subject: [PATCH] Bug 15030: Fix the uninitialized warnings in ClassSortRoutine::_get_class_sort_key https://bugs.koha-community.org/show_bug.cgi?id=15030 --- C4/ClassSortRoutine.pm | 3 ++- t/db_dependent/Serials.t | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/ClassSortRoutine.pm b/C4/ClassSortRoutine.pm index d5fd8a0..ad9b6c9 100644 --- a/C4/ClassSortRoutine.pm +++ b/C4/ClassSortRoutine.pm @@ -112,7 +112,8 @@ letter characters. =cut sub _get_class_sort_key { - my ($cn_class, $cn_item) = @_; + my $cn_class = shift || ''; + my $cn_item = shift || ''; my $key = uc "$cn_class $cn_item"; $key =~ s/\s+/_/; $key =~ s/[^A-Z_0-9]//g; diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t index 2cd44dd..3d4d7be 100755 --- a/t/db_dependent/Serials.t +++ b/t/db_dependent/Serials.t @@ -16,7 +16,7 @@ use C4::Biblio; use C4::Budgets; use C4::Items; use Koha::DateUtils; -use Test::More tests => 48; +use Test::More tests => 49; BEGIN { use_ok('C4::Serials'); -- 1.9.1