git://git.camperquake.de
/
videosite.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
- Check for existance of field before using it
[videosite.git]
/
videosite
/
CollegeHumorGrabber.pm
diff --git
a/videosite/CollegeHumorGrabber.pm
b/videosite/CollegeHumorGrabber.pm
index
3bda5dd
..
b25043c
100644
(file)
--- 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'};
}
}