From 3ca3ce0726ba05d130153c6f629ae78f7d7ae33b Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 16 Aug 2018 20:43:11 +0200 Subject: [PATCH] Fix #1616 --- app/Helpers/Chart/MetaPieChart.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Helpers/Chart/MetaPieChart.php b/app/Helpers/Chart/MetaPieChart.php index f60fe020a6..a6c97ef32d 100644 --- a/app/Helpers/Chart/MetaPieChart.php +++ b/app/Helpers/Chart/MetaPieChart.php @@ -360,7 +360,8 @@ class MetaPieChart implements MetaPieChartInterface foreach ($array as $objectId => $amount) { if (!isset($names[$objectId])) { $object = $repository->findNull((int)$objectId); - $names[$objectId] = $object->name ?? $object->tag; + $name = null === $object ? '(no name)' : $object->name; + $names[$objectId] = $name ?? $object->tag; } $amount = app('steam')->positive($amount); $this->total = bcadd($this->total, $amount);