Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#36942 closed defect (bug) (fixed)

put_contents doesn't unlink file on error

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


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@… 5 years ago.
added unlink to situation with error

Download all attachments as: .zip

Change History (6)

5 years ago

added unlink to situation with error

#1 @ruud@…
5 years ago

  • Keywords has-patch dev-feedback added

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

#2 @ruud@…
5 years ago

related to #36941 and #36943

#3 @ocean90
5 years ago

  • Version trunk deleted

#4 @dd32
5 years ago

  • Keywords dev-feedback removed
  • Milestone changed from Awaiting Review to 4.6
  • Owner set to dd32
  • Status changed from new to accepted

#5 @ocean90
5 years ago

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

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.