[wp-trac] [WordPress Trac] #43374: PHP 7.2 Warning: count(): Parameter must be an array or an object that implements Countable in /wp-includes/theme.php on line 356
WordPress Trac
noreply at wordpress.org
Fri Apr 20 19:46:35 UTC 2018
#43374: PHP 7.2 Warning: count(): Parameter must be an array or an object that
implements Countable in /wp-includes/theme.php on line 356
--------------------------------------+-----------------------
Reporter: burlingtonbytes | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.9.6
Component: Themes | Version:
Severity: minor | Resolution:
Keywords: good-first-bug has-patch | Focuses:
--------------------------------------+-----------------------
Comment (by desrosj):
#43583 will introduce an `is_countable()` polyfill for the PHP 7.3
function with the same name. I think it makes sense to start using that
function here to fix this warning.
[attachment:43374.patch] utilizes the `is_countable()` function to avoid
the PHP warning. Of course, this depends on the patch in #43583 being
committed first.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43374#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list