[wp-trac] [WordPress Trac] #49895: PHP Warning: count(): Parameter must be an array or an object that implements Countable

WordPress Trac noreply at wordpress.org
Mon Apr 13 17:42:25 UTC 2020


#49895: PHP Warning:  count(): Parameter must be an array or an object that
implements Countable
-------------------------------+------------------------------
 Reporter:  jbx                |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  5.4
 Severity:  minor              |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by afragen):

 It seems that, in this case, in the function `get_the_contents()` the
 `global $pages`, which is defined as an array, is not returning an array
 into the function.

 The cause of this needs to be investigated. Is this reproducible on other
 sites for you running PHP 7.4.x? Personally, I'm not seeing this error.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49895#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list