Patch from Jason Stephenson to silence spurious warnings: https://bugs.launchpad...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 4 Jan 2011 15:10:48 +0000 (15:10 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 4 Jan 2011 15:10:48 +0000 (15:10 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19096 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm

index 1e16add..6b96ffa 100644 (file)
@@ -1181,7 +1181,10 @@ sub new_hold_copy_targeter {
                        my $all_copies = [];
 
                        # find filters for MR holds
-                       my ($types, $formats, $lang) = split '-', $hold->holdable_formats;
+                       my ($types, $formats, $lang);
+                       if (defined($hold->holdable_formats)) {
+                               ($types, $formats, $lang) = split '-', $hold->holdable_formats;
+                       }
 
                        # find all the potential copies
                        if ($hold->hold_type eq 'M') {
@@ -1196,7 +1199,7 @@ sub new_hold_copy_targeter {
                                                                ],
                                                                ( $types   ? (item_type => [split '', $types])   : () ),
                                                                ( $formats ? (item_form => [split '', $formats]) : () ),
-                                                               ( $lang    ? (item_lang => $lang)                : () ),
+                                                               ( $lang    ? (item_lang => $lang)                                : () ),
                                                        )
                                ) {
                                        my ($rtree) = $self