[open-ils-commits] r15984 - branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Utils (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Mar 25 14:58:45 EDT 2010


Author: dbs
Date: 2010-03-25 14:58:40 -0400 (Thu, 25 Mar 2010)
New Revision: 15984

Modified:
   branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm
Log:
Fix warning from comparison with a possibly undef variable

Modified: branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm
===================================================================
--- branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm	2010-03-25 18:58:13 UTC (rev 15983)
+++ branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm	2010-03-25 18:58:40 UTC (rev 15984)
@@ -129,7 +129,7 @@
 				# 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 );



More information about the open-ils-commits mailing list