From 13ef318f272a77cf5a9ccfe95a5bd628521f39c9 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 14 Dec 2007 15:28:54 +0000 Subject: [PATCH] eliminate an array_keys warning if $$fieldvar isnt set --- admin/reports.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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']}'