Opened 6 years ago
Closed 6 years ago
#45420 closed defect (bug) (fixed)
requiring wp-admin/includes/image.php twice in WP_REST_Attachments_Controller::create_item
Reported by: | david.binda | Owned by: | pento |
---|---|---|---|
Milestone: | 5.0.2 | Priority: | normal |
Severity: | minor | Version: | 5.0 |
Component: | REST API | Keywords: | has-patch fixed-5.0 |
Focuses: | Cc: |
Description
The r43773 introduced require_once ABSPATH . 'wp-admin/includes/image.php'
twice in WP_REST_Attachments_Controller::create_item
method.
While the require_once
mitigates the possible side-effect of redeclaring the same functions twice on the media endpoint, it should be really only required once, since it's enough :)
Attachments (1)
Change History (9)
Note: See
TracTickets for help on using
tickets.
Thanks, @david.binda. Your patch looks good to me.
Marking this as a
5.0.1
item, but it's relatively minor and can be punted if need be (mainly depending on how quickly5.0.1
is released).