[wp-trac] [WordPress Trac] #35480: Some notice and warning in wp_calculate_image_srcset() function media.php
    WordPress Trac 
    noreply at wordpress.org
       
    Fri Mar 11 21:25:55 UTC 2016
    
    
  
#35480: Some notice and warning in wp_calculate_image_srcset() function media.php
------------------------------------------+------------------------
 Reporter:  overclokk                     |       Owner:  joemcgill
     Type:  defect (bug)                  |      Status:  accepted
 Priority:  normal                        |   Milestone:  4.5
Component:  Media                         |     Version:  4.4.1
 Severity:  normal                        |  Resolution:
 Keywords:  needs-unit-tests needs-patch  |     Focuses:  template
------------------------------------------+------------------------
Changes (by azaozz):
 * keywords:  has-patch needs-unit-tests => needs-unit-tests needs-patch
Comment:
 > ...for some reasons the meta data is corrupted.
 > I'm not sure if wp_calculate_image_srcset() needs to handle this case
 though.
 Right. To work, `wp_calculate_image_srcset()` needs all of the meta.
 Bypassing the image when some meta is missing or the meta is corrupted
 seems best.
 The `is_array( $image )` check is good, needs another for the image name.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35480#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list