mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #3064
This commit is contained in:
parent
43232c208f
commit
a6fab50c20
@ -32,6 +32,7 @@ class ChartJsGenerator implements GeneratorInterface
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
*
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@ -119,6 +120,9 @@ class ChartJsGenerator implements GeneratorInterface
|
|||||||
{
|
{
|
||||||
reset($data);
|
reset($data);
|
||||||
$first = current($data);
|
$first = current($data);
|
||||||
|
if (!is_array($first)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
$labels = is_array($first['entries']) ? array_keys($first['entries']) : [];
|
$labels = is_array($first['entries']) ? array_keys($first['entries']) : [];
|
||||||
|
|
||||||
$chartData = [
|
$chartData = [
|
||||||
|
Loading…
Reference in New Issue
Block a user