mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-19 02:52:44 +00:00
A fix for apparently unknown category names [skip ci]
This commit is contained in:
@@ -404,7 +404,7 @@ class AccountController extends Controller
|
|||||||
$names = $this->getCategoryNames(array_keys($result));
|
$names = $this->getCategoryNames(array_keys($result));
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$categoryId = $row['category_id'];
|
$categoryId = $row['category_id'];
|
||||||
$name = $names[$categoryId];
|
$name = $names[$categoryId] ?? '(unknown)';
|
||||||
$label = (string)trans('firefly.name_in_currency', ['name' => $name, 'currency' => $row['currency']]);
|
$label = (string)trans('firefly.name_in_currency', ['name' => $name, 'currency' => $row['currency']]);
|
||||||
$chartData[$label] = $row['total'];
|
$chartData[$label] = $row['total'];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user