diff --git a/admin/reports.inc.php b/admin/reports.inc.php index 707e57d0..a74c0359 100644 --- a/admin/reports.inc.php +++ b/admin/reports.inc.php @@ -333,7 +333,10 @@ foreach($report_stock as $n=>$v) { $report['loc'] = array(); $fieldvar = "report_{$report['type']}s_fields"; - $allow_fields = array_keys($$fieldvar); + if(is_array($$fieldvar)) + $allow_fields = array_keys($$fieldvar); + else + $allow_fields=array(); $q = mysql_query("SELECT * FROM reports_items WHERE reports_id='{$report['id']}'