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

Fixed incorrect return type of PDO::quote() #2926

Open
wants to merge 1 commit into
base: 1.11.x
Choose a base branch
from

Conversation

rasmus0201
Copy link

@phpstan-bot
Copy link
Collaborator

You've opened the pull request against the latest branch 1.11.x. If your code is relevant on 1.10.x and you want it to be released sooner, please rebase your pull request and change its target to 1.10.x.

@VincentLanglet
Copy link
Contributor

Friendly ping @ondrejmirtes you might have missed this "easy" PR to review or do you also want a non-regression test for such changes ?

@ondrejmirtes
Copy link
Member

I didn't merge this yet because I'm not sure about this change.

The documentation states:

Returns false if the driver does not support quoting in this way.

So a benevolent union type might be the better choice here - __benevolent<string|false>.

Also the usage of this function at all is not recommended in favor of prepared statements.

That's why I didn't rush to merge this.

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