Opened 9 years ago
Closed 9 years ago
#32755 closed defect (bug) (fixed)
media_sideload_image should return early when preg_match didn't match
Reported by: | serpent7776 | Owned by: | chriscct7 |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.2.2 |
Component: | Upload | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
If media_sideload_image function is given an url that does not match pattern
'/[^\?]+\.(jpe?g|jpe|gif|png)\b/i'
it should return with error instead of carrying on, because it raises a notice
Notice: Undefined offset: 0 in <path>/wordpress/wp-admin/includes/media.php on line 840
basicaly it tries to access
basename( $matches[0] )
but $matches is empty
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
In 34984: