recursive calls to _object_by_path need their own copy of the path array so that...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 1 Apr 2009 17:38:57 +0000 (17:38 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 1 Apr 2009 17:38:57 +0000 (17:38 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12750 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm

index c885c41..1199543 100644 (file)
@@ -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));