From 66dda1630329baaf6dc369769cfa75bc914eed87 Mon Sep 17 00:00:00 2001 From: berick Date: Thu, 26 May 2011 14:44:48 -0400 Subject: [PATCH] Protect against empty lists of linked bib searches Instead of returning undef when passed an empty list of bibs, always return an array from open-ils.cat.authority.records.count_linked_bibs Apart from consistency, this prevents JS errors in the Manage Authorities UI. Signed-off-by: berick --- Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm index 1995edf887..9e6055739c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm @@ -194,7 +194,7 @@ sub count_linked_bibs { my $editor = new_editor(); - my $link_count; + my $link_count = []; my @clean_records; for my $auth ( @$records ) { # Protection against SQL injection? Might be overkill. -- 2.11.0