Skip to content

Commit

Permalink
Minor - fix PHP warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Nov 2, 2018
1 parent 0d51722 commit 9d6b2eb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main/gradebook/lib/fe/flatviewtable.class.php
Expand Up @@ -187,7 +187,11 @@ public function display_graph_by_resource()
$dataSet = new pData();
$dataSet->addPoints($resource, 'Serie');
$dataSet->addPoints(array_keys($resource), 'Labels');
$dataSet->setSerieDescription('Labels', strip_tags($headerName[$i - 1]));
$header = $headerName[$i - 1];
if (is_array($header) && isset($header['header'])) {
$header = $header['header'];
}
$dataSet->setSerieDescription('Labels', strip_tags($header));
$dataSet->setAbscissa('Labels');
$dataSet->setAbscissaName(get_lang('GradebookSkillsRanking'));
$dataSet->setAxisName(0, get_lang('Students'));
Expand Down Expand Up @@ -245,7 +249,7 @@ public function display_graph_by_resource()
$myPicture->drawText(
250,
30,
strip_tags($headerName[$i - 1]),
strip_tags($header),
[
'FontSize' => 12,
'Align' => TEXT_ALIGN_BOTTOMMIDDLE,
Expand Down

0 comments on commit 9d6b2eb

Please sign in to comment.