- Check for existance of field before using it
authorRalf Ertzinger <sun@lain.camperquake.de>
Sun, 27 Apr 2008 21:10:45 +0000 (23:10 +0200)
committerRalf Ertzinger <sun@lain.camperquake.de>
Sun, 27 Apr 2008 21:10:45 +0000 (23:10 +0200)
videosite/CollegeHumorGrabber.pm

index 3bda5dd..b25043c 100644 (file)
@@ -78,7 +78,7 @@ sub _parse {
     # Look for the title in the meta tags
     foreach $t (@accum) {
         if ('meta' eq $t->[0]) {
-            if ('title' eq $t->[1]->{'name'}) {
+            if (exists($t->[1]->{'name'}) and ('title' eq $t->[1]->{'name'})) {
                 $metadata->{'TITLE'} = $t->[1]->{'content'};
             }
         }