Commit 52b121e3 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 469207: Old chart reports crash if there is no data yet - Patch by…

Bug 469207: Old chart reports crash if there is no data yet - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=gerv a=LpSolit
parent 1c881b96
...@@ -215,6 +215,7 @@ sub generate_chart { ...@@ -215,6 +215,7 @@ sub generate_chart {
if (/^#/) { if (/^#/) {
if (/^# fields?: (.*)\s*$/) { if (/^# fields?: (.*)\s*$/) {
@fields = split /\||\r/, $1; @fields = split /\||\r/, $1;
$data{$_} ||= [] foreach @fields;
unless ($fields[0] =~ /date/i) { unless ($fields[0] =~ /date/i) {
ThrowCodeError('chart_datafile_corrupt', {'file' => $data_file}); ThrowCodeError('chart_datafile_corrupt', {'file' => $data_file});
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment