Update Amount.php

Fix null pointer #854
This commit is contained in:
James Cole
2017-09-20 08:31:00 +02:00
committed by GitHub
parent db9c0600a8
commit e442eb6ce2

View File

@@ -36,6 +36,10 @@ class Amount implements ConverterInterface
*/
public function convert($value): string
{
if(is_null($value)) {
return '0';
}
$value = strval($value);
Log::debug(sprintf('Start with amount "%s"', $value));
$len = strlen($value);
$decimalPosition = $len - 3;