Skip to content

Add missing ZPP checks #4878

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

Closed
wants to merge 4 commits into from
Closed

Add missing ZPP checks #4878

wants to merge 4 commits into from

Conversation

kocsismate
Copy link
Member

No description provided.

mysqli_thread_safe($link);
} catch (ArgumentCountError $exception) {
print($exception->getMessage() . "\n");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just drop this part.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to disallow passing a mysqli instance to mysqli_thread_safe(), we should also mark the associtated mysqli::thread_safe() as static. Same for mysqli::get_client_info(). See also https://bugs.php.net/78790.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmb69 Thank you for your help on the issue. Does it need any discussion in order to declare them static or can I go ahead and create a PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be discussed, at least. After all, even the documentation states that mysqli_get_client_info() is supposed to be called with a mysqli argument, so this might be quite some BC break. :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's documented, let's go with what the docs say it should be.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem: if we enforce the mysqli parameter, likely some code which doesn't pass would break. Also docs are inconsistent regarding mysqli_get_client_info() and mysqli_thread_safe() (the latter is parameterless). This is rather messy :(

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

Successfully merging this pull request may close these issues.

4 participants