diff --git a/src/Mapping/Operator/Factory/Numeric.php b/src/Mapping/Operator/Factory/Numeric.php index 13446b7..a0a7db7 100644 --- a/src/Mapping/Operator/Factory/Numeric.php +++ b/src/Mapping/Operator/Factory/Numeric.php @@ -35,11 +35,13 @@ public function process($inputData, bool $dryRun = false) $inputData = reset($inputData); } - if ($this->returnNullIfEmpty && empty($inputData)) { + $floatValue = floatval($inputData); + + if ($this->returnNullIfEmpty && empty($floatValue)) { return null; } - return floatval($inputData); + return $floatValue; } /**