Make titles understand compressed holdings
authorDan Wells <dbw2@calvin.edu>
Tue, 17 Sep 2013 21:02:54 +0000 (17:02 -0400)
committerDan Wells <dbw2@calvin.edu>
Wed, 18 Sep 2013 11:03:13 +0000 (07:03 -0400)
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Holding.pm

index bee629f..a3836ef 100644 (file)
@@ -143,7 +143,9 @@ sub unit_titles {
     my ($self, $key) = @_;
 
     if (exists $self->fields->{$key}) {
-        my @titles = $self->fields->{$key}{UNIT_TITLES};
+        # this dereferences and makes a new reference to make sure
+        # the return value is a copy (not pointing to the object data)
+        my @titles = @{$self->fields->{$key}{UNIT_TITLES}};
         return \@titles;
     } else {
         return;