Skip to content

Conversation

@nosilver4u
Copy link

Prevent passing null to param #2 of preg_match()

Since param #2 of preg_match() needs to be a string, this checks to make sure $real is a string, and that $real is not empty, since it's a waste of CPU to run preg_match() on an empty string/value.

Trac ticket: https://core.trac.wordpress.org/ticket/59195


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Prevent passing null to param WordPress#2 of preg_match()
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.

1 participant