From e442eb6ce28051947c02d9ff2d3830c7a9ed3321 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 20 Sep 2017 08:31:00 +0200 Subject: [PATCH] Update Amount.php Fix null pointer #854 --- app/Import/Converter/Amount.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Import/Converter/Amount.php b/app/Import/Converter/Amount.php index 1177b86a2e..bf1f23fdf9 100644 --- a/app/Import/Converter/Amount.php +++ b/app/Import/Converter/Amount.php @@ -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;