summarylogtreecommitdiffstats
path: root/003-mythcount.patch
blob: 599384a1cbb1c0d3f6f64a1c72df491e35a01aa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/bindings/php/MythBackend.php b/bindings/php/MythBackend.php
index 54472e9489..9360e8801e 100644
--- a/bindings/php/MythBackend.php
+++ b/bindings/php/MythBackend.php
@@ -42,7 +42,7 @@ class MythBackend {
                             ."need to check your mythweb.conf file or re-run mythtv-setup",
                             FATAL);
         }
-                
+
                 if (!isset($Backends[$host]))
                         $Backends[$host] = array();
 
@@ -191,7 +191,8 @@ class MythBackend {
     // Parse the records, starting at the offset point
         $row = 0;
         $col = 0;
-        $count = count($records);
+       if ($records) $count = count($records);
+       else $count = 0;
         for($i = $offset; $i < $count; $i++) {
             $rows[$row][$col] = $records[$i];
         // Every $NUMPROGRAMLINES fields (0 through ($NUMPROGRAMLINES-1)) means