From 791f4ae0710b76750d603b76fa9d17495212cc1c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 9 Sep 2011 19:46:44 +0000 Subject: [PATCH] remove empty rows required by old etemplate to compensate for header rows --- etemplate/inc/class.etemplate_widget_nextmatch.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php index be5b995a14..9f2f1fbe40 100644 --- a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php +++ b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php @@ -214,6 +214,15 @@ class etemplate_widget_nextmatch extends etemplate_widget */ // otherwise we get stoped by max_excutiontime if ($total > 200) @set_time_limit(0); + + // remove empty rows required by old etemplate to compensate for header rows + foreach($rows as $n => $row) + { + if (is_array($row)) break; + unset($rows[$n]); + } + $rows = array_values($rows); // renumber keys to be 0 based + //error_log($value['get_rows'].'() returning '.array2string($total).', method = '.array2string($method).', value = '.array2string($value)); return $total; }