From e2ce2419941e8df880bd39510696e4ee92c49969 Mon Sep 17 00:00:00 2001 From: Sean Burke Date: Fri, 7 Feb 2014 02:05:29 -0500 Subject: [PATCH] fixed an empty array error --- statistics.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/statistics.php b/statistics.php index 698093b..2c3f197 100644 --- a/statistics.php +++ b/statistics.php @@ -34,15 +34,17 @@ User Number of Events '; - -foreach($page->DB->resultToArray() as $key => $value) +if(is_array($page->DB->resultToArray() )) { - $top_participants .= '
- - '.$value[0].' - '.$value[1].' -
-
'; + foreach($page->DB->resultToArray() as $key => $value) + { + $top_participants .= '
+ + '.$value[0].' + '.$value[1].' +
+
'; + } } $top_participants .= "