-
-
Notifications
You must be signed in to change notification settings - Fork 947
Bogus error in for-loop (difficult to explain) #7044
Copy link
Copy link
Closed
phpstan/phpstan-src
#1646Labels
Milestone
Description
Bug report
The below error was discovered during PocketMine-MP development. When LOWER_PADDING_SIZE has a value of 4, everything is OK. However, when reducing it to zero, for some reason PHPStan thinks that I'm incrementing a string, which makes no sense.
I may have previously reported this, but if I did I couldn't find a similar issue.
Code snippet that reproduces the problem
https://phpstan.org/r/cdc088cd-8927-40ed-8fc5-f41112192430
Expected output
The bogus error shouldn't be reported.
Possibly, an error should be reported about the loop never looping, but that seems like a topic for a feature request and not a bug report.
Reactions are currently unavailable