Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Possible PHP 7.2 Coding problem - count() parameter #4957
When running PHP 7.2 on a high-traffic site with multiple types of custom posts, error logs are showing sporadic warnings:
These warnings correspond to searches for specific words or phrases on the site. Only some searches produce the error - but the error can be replicated by repeating the same search. Because or the sporadic nature, I believe that the error is produced if the search results pull up specific Pod custom post templates. This seems to be tied to one or more
Note that site uses Relevanssi plugins for searches.
All code within Pods should be compliant with the PHP 7.2 changed standard for count() functions.
PHP warning message generated in error logs; does not otherwise impact site function. Just creates messy logs.
Steps to Reproduce (for bugs)
May be site specific. I have not been able to reproduce this by simply conducting random searches on the site. Instead I have to look at the time stamp in the error log -- find the corresponding entry in the access log -- and then repeat the identical search as reflectedin the GET request.
No clue -- and it may not be a bug at all, but something specific to configuration of some of the pods and pod templates.
Pods Package Export (helpful!)
Workaround or Alternate Solution Until Bug is Addressed
Revert to PHP 7.1
Related Issues and/or PRs