From: Bill Erickson Date: Fri, 29 Jul 2011 16:19:18 +0000 (-0400) Subject: Prevent undef warnings on org unit lookup X-Git-Tag: sprint4-merge-nov22~5128^2~76^2^2~7^2~1 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a21deb11cc2c79ff70eab917d283dcf9dcab1e86;p=working%2FEvergreen.git Prevent undef warnings on org unit lookup Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm index 8b12453e70..1245605079 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm @@ -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}; };