Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on str_replace #4780

Closed
vlada-dudr opened this issue May 19, 2023 · 1 comment
Closed

Crash on str_replace #4780

vlada-dudr opened this issue May 19, 2023 · 1 comment

Comments

@vlada-dudr
Copy link

Following snippet crashes phan:

str_replace([...$a], '', $s);

Error message: phar:///usr/share/webapps/bin/phan.phar/src/Phan/Plugin/Internal/StringFunctionPlugin.php:53 [2] Undefined array key "key"

Probably the issue is combination of spreading array into array being followed by string.

$ phan --version
Phan 5.4.2
php-ast version 1.1.0
PHP version used to run Phan: 8.2.6
@rlerdorf
Copy link
Collaborator

This should be fixed with d266825

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants