Skip to content

Commit 04ff18d

Browse files
Pepperoni1337nicolas-grekas
authored andcommitted
Update GetSetMethodNormalizer.php
Fix: Add length check for setter method detection
1 parent 365aca3 commit 04ff18d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ private function isSetMethod(\ReflectionMethod $method): bool
118118
return !$method->isStatic()
119119
&& !$method->getAttributes(Ignore::class)
120120
&& 0 < $method->getNumberOfParameters()
121+
&& 3 < \strlen($method->name)
121122
&& str_starts_with($method->name, 'set')
122123
&& !ctype_lower($method->name[3])
123124
;

0 commit comments

Comments
 (0)