1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Fix for PHP Notice Undefined offset: 0, Line 60 of /e107_plugins/user/e_dashboard.php

This commit is contained in:
Lóna Lore
2017-12-10 11:52:26 +01:00
parent 43f38ccdf2
commit 2719e8796a

View File

@@ -57,14 +57,15 @@ class user_dashboard // plugin-folder + '_url'
$months = e107::getDate()->terms('month');
$data['labels'] = array($months[0], //"January",
$months[1], //"February",
$months[2], //"March",
$months[3], //"April",
$months[4], //"May",
$months[5], //"June",
$months[6] //"July"
);
foreach($months as $month)
{
// We need only the first 6 months for demo.
if (!empty($data['labels']) && count($data['labels']) >= 6)
{
continue;
}
$data['labels'][] = $month;
}
$data['datasets'][] = array(
'fillColor' => "rgba(220,220,220,0.5)",