Fix warning from comparison with a possibly undef variable
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 25 Mar 2010 18:57:31 +0000 (18:57 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 25 Mar 2010 18:57:31 +0000 (18:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15982 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm

index 5c37ce2..1e97458 100644 (file)
@@ -129,7 +129,7 @@ sub get_field_value {
                                # MODS strips the punctuation from 245abc, which often
                                # results in "title subtitle" rather than "title : subtitle";
                                # this hack gets it back for us
-                               if ($type eq 'title' && $child->nodeName =~ m/subTitle/) {
+                               if ($type && $type eq 'title' && $child->nodeName =~ m/subTitle/) {
                                        push(@child_text, " : "); 
                                }
                                next unless( $child->nodeType != 3 );