WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#12990 closed defect (bug) (fixed)

WP_Http_Fopen not available for load_image_to_edit()

Reported by: ryan Owned by: dd32
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: HTTP API Keywords:
Focuses: Cc:

Description

Fatal error: Class 'WP_Http_Fopen' not found in /.../wp-admin/includes/image-edit.php on line 206

Due to the way class-http.php is now demand loaded.

Change History (10)

comment:2 @ryan5 years ago

Leaving open pending discussion of whether to merge class-http.php back into http.php.

comment:3 @nacin5 years ago

  • Component changed from General to HTTP
  • Milestone changed from Unassigned to 3.0
  • Owner set to dd32

Always including it avoids the extra open() syscall, so I'm all for that.

Not sure we need to combine them again. Maybe we can better document the API in http.php and leave them separate. I do like the split, as we separated more than a thousand lines of internals from the functions we want developers to use.

comment:4 @nacin5 years ago

(In [14081]) Unbreak setup-config.php. see #12990

comment:5 @dd325 years ago

Whats the argument here for fixing the parts of the code that rely on the class existing, verses always including it?

We might as well just merge it back together if we're going to always include it.. The reason to split it was partially to prevent having to include a set of code which we weren't going to otherwise use..

comment:6 @nacin5 years ago

Always including it avoids the extra open() syscall for the times we do need it. I don't really have a problem with keeping the files separate, but if there's a desire to re-merge them, we could.

comment:7 @dd325 years ago

Always including it avoids the extra open() syscall for the times we do need it

Which is required rarely compared to when we do. an extra syscall for when needed compared to always opening the file and parsing the contents is going to be faster overall.

comment:8 @nacin5 years ago

Ryan admittedly chose the easy route just to get everything back online. I don't have any preference in how we proceed.

comment:9 @dd325 years ago

The Cookie class might also be needed for direct access before making a request, so having them both included is probably best..

comment:10 @sivel5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Ok, consensus is to leave the files split and include them both, which is the current way we are doing it. Closing as fixed.

Note: See TracTickets for help on using tickets.