From: erickson Date: Wed, 1 Apr 2009 17:38:57 +0000 (+0000) Subject: recursive calls to _object_by_path need their own copy of the path array so that... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7534777ce8767de081d18a277393b392864e5072;p=Evergreen.git recursive calls to _object_by_path need their own copy of the path array so that sibling calls aren't left with an empty path git-svn-id: svn://svn.open-ils.org/ILS/trunk@12750 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 c885c414f1..119954366e 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm @@ -410,7 +410,7 @@ sub _object_by_path { my $path = shift; my $step = shift(@$path); - + my $fhint = Fieldmapper->publish_fieldmapper->{$context->class_name}{links}{$step}{class}; my $fclass = $self->_fm_class_by_hint( $fhint ); @@ -453,7 +453,10 @@ sub _object_by_path { $obj_list = $obj; } - $self->_object_by_path( $_, $collector, $label, $path ) for (@$obj_list); + for (@$obj_list) { + my @path_clone = @$path; + $self->_object_by_path( $_, $collector, $label, \@path_clone ); + } $obj = $$obj_list[0] if (!$multi || $rtype eq 'might_have'); $context->$step( $obj ) if ($obj && (!$label || !@$label));