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

WordPress Trac noreply at wordpress.org
Tue Aug 7 18:44:23 UTC 2018


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

Comment (by volkerg):

 This fixes the error (edit post-template.php line 284), but the german
 pages are still not shown:

 if ( is_array( $pages ) ) {
 if ( $page > count( $pages ) ) // if the requested page doesn't exist
 $page = count( $pages ); // give them the highest numbered page that DOES
 exist
 } else {
 $page = 0;
 } // give them the highest numbered page that DOES exist

 Replying to [comment:61 volkerg]:
 > On our website, we recognize the same error:
 >
 > http://w-k-o.de/das-praesidium/ shows: Warning: count(): Parameter must
 be an array or an object that implements Countable in
 /homepages/28/d689728036/htdocs/clickandbuilds/WorldKennelOrganization/wp-
 includes/post-template.php on line 284
 >
 > It is a multilingual wordpress website with latest polylang, avada
 theme, and other updates. The error occures after updating the components.
 On php 5.6 and on php 7.1 the german pages are not shown, the english
 pages are shown fine.
 >
 > Switching back to php 7.2.8 I got the same error again. Warning is
 shown, german pages are not shown, english pages run fine.
 >
 > If needed I can restore my backup and check if the error occures before
 updating, just changing the php versions or if it is result of an update.
 >
 > I am using WP 4.9.8 running AVADA Child Theme
 >
 > Replying to [ticket:42814 internetwerk]:
 > > Warning with PHP 7.2:
 > >
 > > Warning: count(): Parameter must be an array or an object that
 implements Countable in /wp-includes/post-template.php on line 284
 > >
 > > ---> https://www.blogseye.com/convert-a-web-page-to-a-wordpress-theme-
 in-5-minutes/
 > > ---> https://neu.internetwerk.de/business-webhosting/bestellformular/

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


More information about the wp-trac mailing list