[wp-trac] [WordPress Trac] #43201: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /wp-includes/media.php on line 1206

WordPress Trac noreply at wordpress.org
Fri Feb 2 07:47:05 UTC 2018


#43201: PHP Warning:  count(): Parameter must be an array or an object that
implements Countable in /wp-includes/media.php on line 1206
----------------------------------------+-----------------------------
 Reporter:  codegrau                    |       Owner:  SergeyBiryukov
     Type:  defect (bug)                |      Status:  closed
 Priority:  normal                      |   Milestone:  4.9.4
Component:  Media                       |     Version:  4.9.2
 Severity:  normal                      |  Resolution:  fixed
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:   => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"42639"]:
 {{{
 #!CommitTicketReference repository="" revision="42639"
 Media: Avoid a PHP warning in `wp_calculate_image_srcset()` if a plugin
 returns a non-array value via `wp_calculate_image_srcset` filter.

 Props mrmadhat, codegrau.
 Fixes #43201.
 }}}

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


More information about the wp-trac mailing list