Skip to content

Commit 49d9547

Browse files
author
Oleksii Korshenko
committed
Merge commit 'refs/pull/4087/head' of https://github.com/magento/magento2 into MAGETWO-52574
2 parents 135f967 + e1ee93f commit 49d9547

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/code/Magento/Directory/Model/Currency.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,13 @@ public function convert($price, $toCurrency = null)
233233
return $price * $rate;
234234
}
235235

236-
throw new \Exception(__('Undefined rate from "%1-%2".', $this->getCode(), $toCurrency->getCode()));
236+
throw new \Exception(
237+
__(
238+
'Undefined rate from "%1-%2".',
239+
$this->getCode(),
240+
(is_string($toCurrency)) ? $toCurrency : $toCurrency->getCode()
241+
)
242+
);
237243
}
238244

239245
/**

0 commit comments

Comments
 (0)