LP1895660: AppUtil.pm
authorJason Boyer <JBoyer@equinoxinitiative.org>
Tue, 15 Sep 2020 19:12:57 +0000 (15:12 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 14 May 2021 21:38:08 +0000 (17:38 -0400)
substr outside of string

unique_unnested_numbers expects a list of pg arrays, but if its given
an empty results list it tries to remove { and } from an undefined value.

Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm

index f8e2f49..fce9f7f 100644 (file)
@@ -2287,6 +2287,8 @@ sub unique_unnested_numbers {
 
     no warnings 'numeric';
 
+    return undef unless ( scalar @_ );
+
     return uniq(
         map(
             int,