Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#36942 closed defect (bug) (fixed)

put_contents doesn't unlink file on error

Reported by: ruud@… Owned by: dd32
Priority: normal Milestone: 4.6
Component: Filesystem API Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

similar to #34772, the put_contents method is also lacking the unlinking of the tempfile on error.

Attachments (1)

class-wp-filesystem-ftpext.patch (1.0 KB ) - added by ruud@… 10 years ago.
added unlink to situation with error

Download all attachments as: .zip

Change History (6)

@ruud@…
10 years ago

added unlink to situation with error

#1 @ruud@…
10 years ago

  • Keywords has-patch dev-feedback added

While modifying this method, I also did some code formatting.

#2 @ruud@…
10 years ago

related to #36941 and #36943

#3 @ocean90
10 years ago

  • Version trunk

#4 @dd32
10 years ago

  • Keywords dev-feedback removed
  • Milestone Awaiting Review4.6
  • Owner set to dd32
  • Status newaccepted

#5 @ocean90
10 years ago

  • Resolutionfixed
  • Status acceptedclosed

In 38094:

Filesystem API: Cleanup temporary file when the temporary file couldn't be opened.

Props ruud@joyo.
See #34772.
Fixes #36942, #36943.

Note: See TracTickets for help on using tickets.