[open-ils-commits] r15982 - trunk/Open-ILS/src/perlmods/OpenILS/Utils (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Mar 25 14:57:36 EDT 2010


Author: dbs
Date: 2010-03-25 14:57:31 -0400 (Thu, 25 Mar 2010)
New Revision: 15982

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


Modified: trunk/Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm	2010-03-25 18:47:14 UTC (rev 15981)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm	2010-03-25 18:57:31 UTC (rev 15982)
@@ -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