[wp-trac] [WordPress Trac] #42860: PHP 7.2 warning - Parameter must be an array or an object that implements Countable in /wp-includes/class-wp-query.php on line 3035
WordPress Trac
noreply at wordpress.org
Sun Dec 10 19:38:53 UTC 2017
#42860: PHP 7.2 warning - Parameter must be an array or an object that implements
Countable in /wp-includes/class-wp-query.php on line 3035
-------------------------------+--------------------
Reporter: lisota | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9.2
Component: Query | Version: 4.9.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+--------------------
Comment (by ayeshrajans):
It looks like the `$this->posts` variable was left default `null`, causing
the warning when called with `count()`.
Attached a patch that might solve it, but we should really be waiting for
the reporter's information. A backtrace can explain a lot.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42860#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list