[wp-trac] [WordPress Trac] #44124: Adding is_countable() check to custom-header.php

WordPress Trac noreply at wordpress.org
Thu May 17 16:10:50 UTC 2018


#44124: Adding is_countable() check to custom-header.php
--------------------------+-----------------------------
 Reporter:  ianbelanger   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Updating a single instance of count() in show_header_selector()
 {{{
 if ( count( $var ) > 0 ) {
         // Do something.
 }
 }}}
 with is_countable()
 {{{
 if ( is_countable( $var ) && count( $var ) > 0 ) {
         // Do something.
 }
 }}}
 in the custom-header.php file, in order to avoid warnings in PHP 7.2

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44124>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list