[wp-trac] [WordPress Trac] #35480: Some notice and warning in wp_calculate_image_srcset() function media.php
WordPress Trac
noreply at wordpress.org
Tue Jan 19 08:21:45 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: has-patch needs-unit-tests | Focuses: template
----------------------------------------+------------------------
Comment (by overclokk):
@dd32 it has to be an array because when is not it returns the errors I
wrote above.
@joemcgill the `$image` variable return an array like this:
{{{
array (size=3)
'file' => string 'planet-pro-40-30-30-crackers-30-g--115x120.jpg'
(length=46)
'width' => string '115' (length=3)
'height' => string '120' (length=3)
}}}
When is not an array it return an empty string.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35480#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list