From 75c0481466f0b3887847e24a2069cd396d8f712c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 12 Feb 2018 17:35:53 -0300 Subject: [PATCH] Bug 18403: Fix perlcritic on Koha::Patron Perl::Critic found these violations in "Koha/Patron.pm": "return" statement followed by "sort" at line 798, column 5. Behavior is undefined if called in scalar context. (Severity: 5) Signed-off-by: Jonathan Druart --- Koha/Patron.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index b017d43006..40c8c88574 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -795,7 +795,8 @@ sub libraries_where_can_see_patrons { @restricted_branchcodes = grep { defined $_ } @restricted_branchcodes; @restricted_branchcodes = uniq(@restricted_branchcodes); - return sort (@restricted_branchcodes); + @restricted_branchcodes = sort(@restricted_branchcodes); + return @restricted_branchcodes; } sub has_permission { -- 2.39.5