Skip to content

Commit

Permalink
Merge pull request #2160 from skaut/money-type
Browse files Browse the repository at this point in the history
fix money type
  • Loading branch information
sinacek authored Apr 2, 2023
2 parents d0dce8d + 8ebc1b3 commit 4f0d686
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/model/Infrastructure/Types/MoneyType.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public function getName(): string
return self::NAME;
}

public function convertToPHPValue(mixed $value, AbstractPlatform $platform): Money
public function convertToPHPValue(mixed $value, AbstractPlatform $platform): Money|null
{
return Money::CZK(parent::convertToPHPValue($value, $platform));
return $value === null ? null : Money::CZK(parent::convertToPHPValue($value, $platform));
}

public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): string
Expand Down

0 comments on commit 4f0d686

Please sign in to comment.