8000 Update GetSetMethodNormalizer.php · symfony/symfony@42bb37e · GitHub
[go: up one dir, main page]

Skip to content

Commit 42bb37e

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

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ private function isSetMethod(\ReflectionMethod $method): bool
119119
&& !$method->getAttributes(Ignore::class)
120120
&& 0 < $method->getNumberOfParameters()
121121
&& str_starts_with($method->name, 'set')
122+
&& 3 < strlen($method->name)
122123
&& !ctype_lower($method->name[3])
123124
;
124125
}

0 commit comments

Comments
 (0)
0