Fix crash when trying to view report.cgi with an inaccessible column

beta
Vitaliy Filippov 2018-04-18 14:55:22 +03:00
parent fe7734fbc6
commit 94d624b036
1 changed files with 6 additions and 0 deletions

View File

@ -224,6 +224,12 @@ sub execute
$measure = 'count';
}
# If the user has no access to the measured column, reset it to 'count'
if (!Bugzilla::Search->COLUMNS($runner)->{$measures->{$measure}})
{
$measure = 'count';
}
# Validate the values in the axis fields or throw an error.
my %a;
my @group_by = grep { !($a{$_}++) } values %$field;