1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 13:17:24 +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'); $months = e107::getDate()->terms('month');
$data['labels'] = array($months[0], //"January", foreach($months as $month)
$months[1], //"February", {
$months[2], //"March", // We need only the first 6 months for demo.
$months[3], //"April", if (!empty($data['labels']) && count($data['labels']) >= 6)
$months[4], //"May", {
$months[5], //"June", continue;
$months[6] //"July" }
); $data['labels'][] = $month;
}
$data['datasets'][] = array( $data['datasets'][] = array(
'fillColor' => "rgba(220,220,220,0.5)", 'fillColor' => "rgba(220,220,220,0.5)",