Skip to content

Commit 309ec2f

Browse files
committed
fix: Passing null to parameter error
ErrorException: NumberFormatter::setAttribute(): Passing null to parameter #2 ($value) of type int|float is deprecated
1 parent 83f026d commit 309ec2f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

system/View/Filters.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ public static function local_currency($value, string $currency, ?string $locale
171171
{
172172
helper('number');
173173

174+
$fraction ??= 0;
175+
174176
$options = [
175177
'type' => NumberFormatter::CURRENCY,
176178
'currency' => $currency,

0 commit comments

Comments
 (0)