[wp-trac] [WordPress Trac] #19908: PHP warnings in media listing
WordPress Trac
wp-trac at lists.automattic.com
Fri May 11 22:21:44 UTC 2012
#19908: PHP warnings in media listing
-------------------------------+------------------------------
Reporter: dimitrov.adrian | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.3.1
Severity: trivial | Resolution:
Keywords: reporter-feedback |
-------------------------------+------------------------------
Comment (by xnau):
I ran across this error and i traced it to a problem with the "sizes"
array within the attachment metadata. The metadata for an image that was
triggering the notice looked like this:
array (
'width' => '400',
'height' => '340',
'hwstring_small' => "height='96' width='112'",
'file' => 'default-image.jpg',
'sizes' =>
array (
'thumbnail' =>
array (
'file' => 'default-image-150x127.jpg',
'width' => '150',
'height' => '127',
),
'medium' =>
array (
'file' => 'default-image-200x170.jpg',
'width' => '200',
'height' => '170',
),
'large' => '',
'small-thumb' =>
array (
'file' => 'default-image-88x75.jpg',
'width' => '88',
'height' => '75',
),
'micro-thumb' =>
array (
'file' => 'default-image-47x40.jpg',
'width' => '47',
'height' => '40',
),
'product-slide' =>
array (
'file' => 'default-image-376x320.jpg',
'width' => '376',
'height' => '320',
),
'post-thumbnail' =>
array (
'file' => 'default-image-141x120.jpg',
'width' => '141',
'height' => '120',
),
),
'image_meta' =>
array (
'aperture' => '0',
'credit' => '',
'camera' => '',
'caption' => '',
'created_timestamp' => '0',
'copyright' => '',
'focal_length' => '0',
'iso' => '0',
'shutter_speed' => '0',
'title' => '',
),
)
(note the 'large' image size missing it's array)
If I remove the empty size definition element, the notice stops. The
question is how did the metadata get corrupted in the first place? I think
it was possibly caused by a plugin I was using to rebuild the thumbnails
(AJAX Thumbnail Rebuild). More testing is needed, but I thought I'd report
my findings.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19908#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list