Skip to content

Commit

Permalink
BUGFIX: Ensure that only numerical property values are converted to i…
Browse files Browse the repository at this point in the history
…nteger

Otherwise, default to `null`.
  • Loading branch information
grebaldi committed Jun 22, 2023
1 parent 3d0533c commit 01ac51c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Classes/Domain/Service/NodePropertyConversionService.php
Expand Up @@ -155,11 +155,15 @@ protected function convertDateTime($rawValue)
* Convert raw value to integer
*
* @param mixed $rawValue
* @return integer
* @return null|integer
*/
protected function convertInteger($rawValue)
{
return (int)$rawValue;
if (is_numeric($rawValue)) {
return (int) $rawValue;
}

return null;
}

/**
Expand Down

0 comments on commit 01ac51c

Please sign in to comment.