From 7f8669fc619a87e496066fb6f92f3df127e985c5 Mon Sep 17 00:00:00 2001 From: Ralf Ertzinger Date: Sun, 27 Apr 2008 23:10:45 +0200 Subject: [PATCH] - Check for existance of field before using it --- videosite/CollegeHumorGrabber.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/videosite/CollegeHumorGrabber.pm b/videosite/CollegeHumorGrabber.pm index 3bda5dd..b25043c 100644 --- a/videosite/CollegeHumorGrabber.pm +++ b/videosite/CollegeHumorGrabber.pm @@ -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'}; } } -- 1.8.3.1