Skip to content

Commit

Permalink
fixed rate
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Jul 6, 2020
1 parent 240524b commit 75f6d0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public function __construct($currency)
$this->currency = $currency;
$this->name = (string) $attributes['name'];
$this->code = (int) $attributes['code'];
$this->rate = (float) $attributes['rate'] ?? 1;
$this->rate = (float) isset($attributes['rate']) ? $attributes['rate'] : 1;
$this->precision = (int) $attributes['precision'];
$this->subunit = (int) $attributes['subunit'];
$this->symbol = (string) $attributes['symbol'];
Expand Down

0 comments on commit 75f6d0d

Please sign in to comment.