Wimp: Catch possibe use of undefined variable
authorRalf Ertzinger <ralf@skytale.net>
Sat, 11 Feb 2012 14:39:25 +0000 (15:39 +0100)
committerRalf Ertzinger <ralf@skytale.net>
Sat, 11 Feb 2012 14:39:25 +0000 (15:39 +0100)
videosite/WimpGrabber.pm

index c424760..c4f259f 100644 (file)
@@ -63,7 +63,7 @@ sub _parse {
 
     # Look for the title in the meta tags
     foreach $e (@accum) {
-        if ('meta' eq $e->[0]) {
+        if ('meta' eq $e->[0] and exists($e->[1]->{'name'})) {
             if ('description' eq $e->[1]->{'name'}) {
                 $metadata->{'TITLE'} = $e->[1]->{'content'};
                 last;