Offset does not exist on array<int, mixed> #4849
-
|
I'm new to phpstan, but I managed to solve most of the issues in our code. But I'm stuck at what seems to be a very simple error. Even though I did find some issues when searching, I couldn't find a solution for my use case. I must be overlooking something. A short example can be found here and below: <?php declare(strict_types = 1);
class HelloWorld
{
public function __construct(...$args)
{
print($args['hostname']);
}
}
$hello = new HelloWorld(hostname: 'localhost');I get the error: Whatever I try, I can't seem to get this fixed :( I hope some of you guys can help. If I forgot to share anything, let me know. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
This is a bug, please open a bug report about this: https://github.com/phpstan/phpstan/issues/new?assignees=&labels=&template=Bug_report.md Thank you. |
Beta Was this translation helpful? Give feedback.
This is a bug, please open a bug report about this: https://github.com/phpstan/phpstan/issues/new?assignees=&labels=&template=Bug_report.md
Thank you.