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

Fix various notices #1061

Open
wants to merge 4 commits into
base: 5.2.x
Choose a base branch
from
Open

Fix various notices #1061

wants to merge 4 commits into from

Conversation

r-a-y
Copy link
Contributor

@r-a-y r-a-y commented May 26, 2020

Hi,

This PR fixes various notices for PHP 7.3+:

  • Deprecated get_magic_quotes_gpc() notice -- deprecated as of PHP 7.4. I've replaced this with a strpos() slash check.
  • "preg_match(): Compilation failed: invalid range in character class at offset 4" warning -- notice shows up in PHP 7.3+. Fix is to escape the hyphen in the preg_match() call.
  • "Array to string conversion" notice -- not related to PHP 7.3, but came across this while checking the "PressForward > Nominated" page. View the commit message for more info.

Let me know if you have any questions.

r-a-y added 4 commits May 25, 2020 22:42
Replaced it with a strpos() check for a slash.
For the 'nominators' key, the $itemPart is a multi-dimensional array.
We need to grab the keys of the array.
…ss at offset 4" warning.

Hyphen needs to be escaped in preg_match().
… class at offset 4" warning.

Hyphen needs to be escaped in preg_match_all().
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