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

Missing TaintedCallable for ReflectionClass::newInstance() #10117

Closed
cgocast opened this issue Aug 16, 2023 · 2 comments
Closed

Missing TaintedCallable for ReflectionClass::newInstance() #10117

cgocast opened this issue Aug 16, 2023 · 2 comments

Comments

@cgocast
Copy link
Contributor

cgocast commented Aug 16, 2023

The following piece of code correctly raises a TaintedCallable :

<?php

$name = $_GET["name"];
new $name();

but the similar piece of code fails to raise a TaintedCallable :

<?php

$name = $_GET["name"];
$reflector = new ReflectionClass($name);
$reflector->newInstance();
@psalm-github-bot
Copy link

Hey @cgocast, can you reproduce the issue on https://psalm.dev ?

cgocast added a commit to cgocast/psalm that referenced this issue Aug 22, 2023
cgocast added a commit to cgocast/psalm that referenced this issue Aug 26, 2023
cgocast added a commit to cgocast/psalm that referenced this issue Aug 26, 2023
@cgocast
Copy link
Contributor Author

cgocast commented Sep 4, 2023

Fixed by #10154

@cgocast cgocast closed this as completed Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants