Bug report
Code snippet that reproduces the problem
/**
* Reads configuration data from the storage.
* @return array|bool
*/
function readThing() {
return ['module' => ['test' => 0]];
}
$extensions = readThing();
$extensions['theme']['test_basetheme'] = 0;
// This is the important part of the test. Themes are ordered alphabetically
// in core.extension so this will come before it's base theme.
$extensions['theme']['test_subtheme'] = 0;
$extensions['theme']['test_subsubtheme'] = 0;
unset($extensions['theme']['test_basetheme']);
unset($extensions['theme']['test_subsubtheme']);
unset($extensions['theme']['test_subtheme']);
Expected: No errors
Results in:
Cannot unset offset 'test_basetheme' on array{test_subtheme: 0, test_subsubtheme: 0}.
https://phpstan.org/r/33cd311d-fd19-430a-b3f5-945174682f2a
Did PHPStan help you today? Did it make you happy in any way?
PHPStan made me happy because bit by bit we're using it to improve Drupal. Thanks for all the work on it!
Bug report
Code snippet that reproduces the problem
Expected: No errors
Results in:
https://phpstan.org/r/33cd311d-fd19-430a-b3f5-945174682f2a
Did PHPStan help you today? Did it make you happy in any way?
PHPStan made me happy because bit by bit we're using it to improve Drupal. Thanks for all the work on it!