#22824 closed defect (bug) (fixed)
multi_resize can cause fatal if individual _save(s) fail
Reported by: | dh-shredder | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | critical | Version: | 3.5 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
multi_resize
is not properly checking for WP_Error
after a save before dereferencing the metadata returned from _save(). This can cause a fatal error (due to dereferencing a WP_Error
) if one of the individual saves fails.
This is a regression to the previous behavior in 3.4.2
Patch attached fixes this by moving the array access/unset into the ! is_wp_error()
check.
Attachments (1)
Change History (6)
#1
@
12 years ago
- Milestone changed from Awaiting Review to 3.5
- Severity changed from major to critical
#3
@
12 years ago
- Cc dh-shredder added
We could also get rid of the && $resized
, since we're guaranteed to receive either an array or WP_Error
from _save()
in both classes, but left it the way it was to avoid additional logic churn.
Note: See
TracTickets for help on using
tickets.
Looked and tested the patch and it's good