Homec4science

Make sure TempFiles are destroyed after a PHP fatal error

Authored by epriestley <git@epriestley.com> on Aug 21 2014, 20:52.

Description

Make sure TempFiles are destroyed after a PHP fatal error

Summary: Fixes T4284. Object destructors are not called after a fatal, but shutdown functions are.

Test Plan:

  • Created a test script which makes a temp file, then fatals.
  • Before patch, temp file was left around.
  • After patch, it is cleaned up.
  • Explicitly destroyed the tempfile in the script to verify that double-destruction is fine.
  • Removed fatal to verify that normal behavior works as expected.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4284

Differential Revision: https://secure.phabricator.com/D10329

Details

Committed
epriestley <git@epriestley.com>Aug 21 2014, 20:52
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU44b37c30004b: Work around OSX after Yosemite no longer respecting CURLOPT_CAINFO
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU8695cdb1270b: Make sure TempFiles are destroyed after a PHP fatal error (authored by epriestley <git@epriestley.com>).Aug 21 2014, 20:52