diff --git a/admin/reports_editor.php b/admin/reports_editor.php index 5861e81..4f2449b 100644 --- a/admin/reports_editor.php +++ b/admin/reports_editor.php @@ -304,16 +304,18 @@ function reportChange() echo "

Report Data

"; echo ""; $x=0; - foreach($report['col'] as $o=>$d) { - echo ""; - echo ""; - $x++; - + //only go through the columns if there are columns to go through + if(count($report['col'])) { + foreach($report['col'] as $o=>$d) { + echo ""; + echo ""; + $x++; + } } for(;$x<$n_columns;$x++) { echo "";
Column ".($x + 1).": "; - if(intval($x) != intval($o)) { - echo ("WARNING, out of order!"); - } - field_selector("col[$o][field]", "col$o", $d['field']); - echo "
Column ".($x + 1).": "; + if(intval($x) != intval($o)) { + echo ("WARNING, out of order!"); + } + field_selector("col[$o][field]", "col$o", $d['field']); + echo "
Column ".($x + 1).":