Prevent undef warnings on org unit lookup
authorBill Erickson <berick@esilibrary.com>
Fri, 29 Jul 2011 16:19:18 +0000 (12:19 -0400)
committerBill Erickson <berick@esilibrary.com>
Fri, 29 Jul 2011 16:19:18 +0000 (12:19 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm

index 8b12453..1245605 100644 (file)
@@ -105,6 +105,7 @@ sub init_ro_object_cache {
     # Add a special handler for the tree-shaped org unit cache
     $ro_object_subs->{get_aou} = sub {
         my $org_id = shift;
+        return undef unless defined $org_id;
         $ro_object_subs->{aou_tree}->(); # force the org tree to load
         return $cache{map}{aou}{$org_id};
     };