Possible bug: Offset 'c' does not exist on array{w?: int, width?: int, h?: int, height?: int, sc?: string, cr?: string, c?: string}. #6377
-
|
Hello, I think this decision by PhpStan is a bug: https://phpstan.org/r/32f54bdc-1b0b-4ef2-aaae-7ff7454658c4 Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi, this is very complicated code. Although PHPStan sometimes understands this pattern (https://phpstan.org/r/db0fcf36-3ee1-4b13-9764-b261161fecbd), it apparently doesn't work when Fortunately you can rewrite it to equivalent code that's straightforward to understand: https://phpstan.org/r/d3eade46-0d77-49e1-984d-cdf60d9211b9 Feel free to open a new issue - a feature request, so that it can be tracked with similar issues (https://github.com/phpstan/phpstan/milestone/12). You'll get notified when PHPStan starts to understand it as well :) |
Beta Was this translation helpful? Give feedback.

Hi, this is very complicated code. Although PHPStan sometimes understands this pattern (https://phpstan.org/r/db0fcf36-3ee1-4b13-9764-b261161fecbd), it apparently doesn't work when
issetand??are involved.Fortunately you can rewrite it to equivalent code that's straightforward to understand: https://phpstan.org/r/d3eade46-0d77-49e1-984d-cdf60d9211b9
Feel free to open a new issue - a feature request, so that it can be tracked with similar issues (https://github.com/phpstan/phpstan/milestone/12). You'll get notified when PHPStan starts to understand it as well :)