[wp-trac] [WordPress Trac] #42814: PHP 7.2 Warning: ...wp-includes/post-template.php on line 284

WordPress Trac noreply at wordpress.org
Fri Jan 26 13:32:08 UTC 2018


#42814: PHP 7.2 Warning: ...wp-includes/post-template.php on line 284
--------------------------+-----------------------
 Reporter:  internetwerk  |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  4.9.3
Component:  Formatting    |     Version:  4.5
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------

Comment (by Greg Raven):

 I’m seeing the same issue on one of my WordPress sites. When I use any
 version of PHP up to 7.1, the page is fine. When I switch to 7.2, I get
 this error message:


 {{{
 Warning: count(): Parameter must be an array or an object that implements
 Countable in /wp-includes/post-template.php on line 284
 }}}

 So, I compared post-template.php from one of my sites that works fine
 under PHP 7.2 and the one giving me the error. Each is running version
 4.9.2 WordPress. However, there are subtle differences between the two
 post-template.php files! None of the differences is anywhere near line
 284, but I’m still baffled how two supposedly identical files can have
 different content.

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


More information about the wp-trac mailing list