diff --git a/tests/PHPStan/Rules/Arrays/NonexistentOffsetInArrayDimFetchRuleTest.php b/tests/PHPStan/Rules/Arrays/NonexistentOffsetInArrayDimFetchRuleTest.php index a481085088..9db16af6c9 100644 --- a/tests/PHPStan/Rules/Arrays/NonexistentOffsetInArrayDimFetchRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/NonexistentOffsetInArrayDimFetchRuleTest.php @@ -907,6 +907,11 @@ public function testBug12605(): void ]); } + public function testBug4809(): void + { + $this->analyse([__DIR__ . '/data/bug-4809.php'], []); + } + public function testBug11602(): void { $this->reportPossiblyNonexistentGeneralArrayOffset = true; diff --git a/tests/PHPStan/Rules/Arrays/data/bug-4809.php b/tests/PHPStan/Rules/Arrays/data/bug-4809.php new file mode 100644 index 0000000000..92f626854e --- /dev/null +++ b/tests/PHPStan/Rules/Arrays/data/bug-4809.php @@ -0,0 +1,27 @@ +