Opened 12 years ago
Closed 11 years ago
#24459 closed defect (bug) (fixed)
Editing images with GD breaks with streams
Reported by: | rmccue | Owned by: | ryan |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Media | Keywords: | has-patch reporter-feedback |
Focuses: | Cc: |
Description
See #18543 for the original ticket when support for this was added.
Unfortunately, when this was committed, it was inadvertently broken. Although the $filename
parameter is set to null, this is never used, and instead $arguments
is passed to the GD functions. GD then receives a stream URL, and breaks completely.
Instead, $arguments[1]
should be set to null in WP_Image_Editor::make_image()
if the URL is a stream.
Attachments (4)
Change History (15)
#4
@
11 years ago
For reference, you can reproduce via App Engine, disabling the workaround code in there (line 508).
#5
@
11 years ago
The patch looks fine to me. Did remove the $dst_file variable in my patch since that isn't needed anymore.
#6
@
11 years ago
Added a new patch that moves this logic to the GD editor. We can check if arguments[1] is set and then unset it but you never know what other implementation someone has. With previous patches imagick will fatal error since it would send 2 arguments instead of only 1.
I did some basic tests but not yet with streams. My laptop is crashing randomly.
#8
@
11 years ago
24459.4.diff seems to make sense to me.
#9
@
11 years ago
I tested 24459.4.diff and it seems to work for me.
markoheijnen, DH-Shredder?