You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Always assigned variable in conditional body branch should be substracted from mutually-exclusive context #12992
Activity
rx80 commentedon May 10, 2025
A smaller repro: https://phpstan.org/r/dbc96db2-3c79-4904-aec9-8dff6ed5b599
phpstan-bot commentedon Sep 25, 2025
@mvorisek After the latest push in 2.1.x, PHPStan now reports different result with your code snippet:
Full report
PHP 8.1 – 8.4 (2 errors)
Offset 'uri' might not exist on array{timed_out: bool, blocked: bool, eof: bool, unread_bytes: int, stream_type: string, wrapper_type: string, wrapper_data: mixed, mode: string, ...}.Variable $errorLogPrevious might not be defined.PHP 8.0 (3 errors)
Offset 'uri' might not exist on array{timed_out: bool, blocked: bool, eof: bool, unread_bytes: int, stream_type: string, wrapper_type: string, wrapper_data: mixed, mode: string, ...}.Variable $errorLogPrevious might not be defined.PHP 7.2 – 7.4 (3 errors)
Offset 'uri' might not exist on array{timed_out: bool, blocked: bool, eof: bool, unread_bytes: int, stream_type: string, wrapper_type: string, wrapper_data: mixed, mode: string, ...}.Variable $errorLogPrevious might not be defined.Add regression tests for phpstan/phpstan#12992 and phpstan/phpstan#14227
Add regression tests for phpstan/phpstan#12992 and phpstan/phpstan#14227
phpstan-bot commentedon Mar 30, 2026
Closed via merging phpstan/phpstan-src#5056
github-actions commentedon May 1, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.