Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be335e6

Browse files
review
Co-authored-by: Nicolas Grekas <[email protected]>
1 parent 50d9ce1 commit be335e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ final protected function applyFilterBool(\ReflectionParameter $parameter, mixed
541541
return $value;
542542
}
543543

544-
if (null === ($filteredData = filter_var($value, \FILTER_VALIDATE_BOOL, \FILTER_NULL_ON_FAILURE))) {
544+
return filter_var($value, \FILTER_VALIDATE_BOOL, \FILTER_NULL_ON_FAILURE) ?? $value;
545545
return $value;
546546
}
547547

0 commit comments

Comments
 (0)