From dad2125544baf22d16b015214a1b76d3f2f047ad Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 13 Oct 2017 19:30:24 +0200 Subject: [PATCH] debug --- build/api/module/fetchDefault.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build/api/module/fetchDefault.php b/build/api/module/fetchDefault.php index a41a5ec..ceb8aed 100644 --- a/build/api/module/fetchDefault.php +++ b/build/api/module/fetchDefault.php @@ -136,11 +136,12 @@ /* (2) Calcl the total to add */ $total = 0; + foreach($data as $entry){ // Only if positive numeric - if( is_numeric($entry) && $entry > 0 ) - $total += intval($entry); + if( isset($entry[0]) && is_numeric($entry[0]) && $entry[0] > 0 ) + $total += intval($entry[0]); $count++; }