#17736 closed defect (bug) (fixed)
Undefined Index in image-edit.php
Reported by: | miqrogroove | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 3.1.3 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
PHP Notice: Undefined index: thumbnail in wp-admin/includes/image-edit.php on line 649
if ( $thumb = $meta['sizes']['thumbnail'] )
Attachments (2)
Change History (10)
#2
@
13 years ago
- Keywords has-patch added
A !empty()
check probably wouldn't hurt.
I couldn't reproduce the issue though. The notice means that there's no thumbnail for the image, while "Thumbnail Settings" block with target selection is only displayed when the thumbnail is present.
Perhaps the image metadata was malformed? In that case, the issue might be deeper.
#3
@
13 years ago
I tried and reproduced such problem (on wordpress daily build) when i moving a website from one host to other, but the interesting is that i just copy the databases, not using the importer/exporter plugins.
#4
@
12 years ago
- Cc dromsey@… added
I ran into the same issue. Sergey's fix worked for me. I did some debugging and noticed that the sizes element was set to an empty array. (I saved $meta to a row in the options table, since I wasn't sure how else to see the value, being that we're in ajax mode at this point during execution). Unfortunately, I'm not sure why the sizes are all gone.
I used the "scale image" option to change an image from 256x300 to a height of 150 and whatever the default width was. After doing so, there was no thumbnail and the editor started bugging out on me. I think that's when the notices were logged.