From: lpsolit%gmail.com <> Date: Sun, 14 Dec 2008 14:28:29 +0000 (+0000) Subject: Bug 469207: Old chart reports crash if there is no data yet - Patch by Frédéric... X-Git-Tag: bugzilla-3.3.1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52b121e307b2b6eada5551f0978f7a863662ede5;p=thirdparty%2Fbugzilla.git Bug 469207: Old chart reports crash if there is no data yet - Patch by Frédéric Buclin r=gerv a=LpSolit --- diff --git a/reports.cgi b/reports.cgi index 40bbc82bb5..6eb4496cca 100755 --- a/reports.cgi +++ b/reports.cgi @@ -215,6 +215,7 @@ sub generate_chart { if (/^#/) { if (/^# fields?: (.*)\s*$/) { @fields = split /\||\r/, $1; + $data{$_} ||= [] foreach @fields; unless ($fields[0] =~ /date/i) { ThrowCodeError('chart_datafile_corrupt', {'file' => $data_file}); }