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

PHPStan complains when passing object with __toString() as arg into sprinf #4

Closed
simPod opened this issue Nov 10, 2018 · 4 comments
Closed

Comments

@simPod
Copy link
Contributor

simPod commented Nov 10, 2018

Parameter #2 $args of function Safe\sprintf expects float|int|string|null, Object\With\ToString\Implemented given.

When \sprinft used, it works just fine so I guess there is some extension needed? Thanks!

@moufmouf
Copy link
Member

Interesting... I'm suspecting this problem might not only be restricted to sprintf but might arise with all functions taking strings as a parameter.

I'll take a look.

@simPod
Copy link
Contributor Author

simPod commented Nov 12, 2018

Ur the best!

@simPod simPod changed the title PHPStan complains when passing object with toString() as arg into sprinf PHPStan complains when passing object with __toString() as arg into sprinf Nov 12, 2018
@OskarStark
Copy link
Collaborator

@simPod is this by any chance already fixed?

@simPod
Copy link
Contributor Author

simPod commented Dec 28, 2024

Possible, let's close. I've removed Safe from my projects already, it was kinda inactive for few years 🙃

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

3 participants