Opened 8 years ago
Closed 8 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 |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.0.2 |
| Component: | REST API | Version: | 5.0 |
| Severity: | minor | Keywords: | has-patch fixed-5.0 |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks, @david.binda. Your patch looks good to me.
Marking this as a
5.0.1item, but it's relatively minor and can be punted if need be (mainly depending on how quickly5.0.1is released).