From: miker Date: Sun, 1 Mar 2009 18:14:54 +0000 (+0000) Subject: fleshing bugs in environment building X-Git-Tag: sprint4-merge-nov22~10687 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4d9c251873c303e0a50c10ede9d7a9ec44c27ead;p=working%2FEvergreen.git fleshing bugs in environment building git-svn-id: svn://svn.open-ils.org/ILS/trunk@12331 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm b/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm index bf708bbb4f..0b3a249296 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm @@ -443,7 +443,7 @@ sub _object_by_path { $self->_object_by_path( $_, $collector, $label, $path ) for (@$obj_list); $obj = $$obj_list[0] if (!$multi); - $context->$step( $obj ) if ($obj && !$label); + $context->$step( $obj ) if ($obj && (!$label || !@$label)); } else { @@ -467,9 +467,9 @@ sub _object_by_path { } } - if ($label) { + if ($label && @$label) { my $node = $self->environment; - my $i = 0; my $max = scalar(@$label) - 1; + my $i = 0; my $max = scalar(@$label); for (; $i < $max; $i++) { my $part = $$label[$i]; $$node{$part} ||= {};