This commit is contained in:
James Cole 2018-07-09 05:37:30 +02:00
parent fc80f828be
commit 42072fdda4

View File

@ -71,15 +71,15 @@ class CurrencyMapper
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,
];