Skip to content

Commit

Permalink
Fix #1452
Browse files Browse the repository at this point in the history
  • Loading branch information
JC5 committed Jul 9, 2018
1 parent fc80f82 commit 42072fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Support/Import/Routine/File/CurrencyMapper.php
Expand Up @@ -71,15 +71,15 @@ public function map(?int $currencyId, array $data): ?TransactionCurrency
return $result;
}
}
if (!isset($data['code']) || $data['code'] === null) {
if (!isset($data['code']) || null === $data['code']) {
return null;
}

// if still nothing, and fields not null, try to create it
$creation = [
'code' => $data['code'],
'name' => $data['name'] ?? $code,
'symbol' => $data['symbol'] ?? $code,
'name' => $data['name'] ?? $data['code'],
'symbol' => $data['symbol'] ?? $data['code'],
'decimal_places' => 2,
];

Expand Down

0 comments on commit 42072fd

Please sign in to comment.