Tv.php
authorAlan Knowles <alan@akbkhome.com>
Sat, 29 Oct 2011 12:37:08 +0000 (20:37 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sat, 29 Oct 2011 12:37:08 +0000 (20:37 +0800)
Tv.php

diff --git a/Tv.php b/Tv.php
index f92c1be..1407dfa 100644 (file)
--- a/Tv.php
+++ b/Tv.php
@@ -234,7 +234,8 @@ class XML_Tv
         $lines = explode("\n",  trim($data));
         //var_dump($lines[1]);
         
-        if (preg_match('/<div/', trim($lines[1]))) {
+        
+        if (isset($lines[1]) && preg_match('/<div/', trim($lines[1]))) {
             
             preg_match('/<BR>([0-9]{4}-[0-9]{2}-[0-9]{2})/i', $lines[1], $matches);
             var_dump($matches[1]);