Fix nullpointer.

This commit is contained in:
James Cole
2026-01-28 20:08:32 +01:00
parent b2f6ce1277
commit 2851053900
@@ -114,7 +114,7 @@ class SubscriptionEnrichment implements EnrichmentInterface
$amounts['pc_amount_min'] = Steam::bcround($item->native_amount_min, $this->primaryCurrency->decimal_places);
$amounts['pc_amount_max'] = Steam::bcround($item->native_amount_max, $this->primaryCurrency->decimal_places);
$amounts['pc_average'] = Steam::bcround(
bcdiv(bcadd($item->native_amount_min, $item->native_amount_max), '2'),
bcdiv(bcadd($item->native_amount_min ?? '0', $item->native_amount_max ?? '0'), '2'),
$this->primaryCurrency->decimal_places
);
}