[wp-trac] [WordPress Trac] #45420: requiring wp-admin/includes/image.php twice in WP_REST_Attachments_Controller::create_item

WordPress Trac noreply at wordpress.org
Mon Nov 26 17:03:17 UTC 2018


#45420: requiring wp-admin/includes/image.php twice in
WP_REST_Attachments_Controller::create_item
--------------------------+-----------------------------
 Reporter:  david.binda   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  5.0
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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 :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45420>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list