From: Tim Starling Date: Thu, 9 Feb 2012 23:56:48 +0000 (+0000) Subject: Fix for r106752: let TempFSFile deletions happen when the object goes out of scope... X-Git-Tag: 1.31.0-rc.0~24807 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=f1052ff5283f1ffc5647bbc997e3c235e5b51550;p=lhc%2Fweb%2Fwiklou.git Fix for r106752: let TempFSFile deletions happen when the object goes out of scope, as you would expect with this RAII pattern, rather than leaving it until shutdown. PHP has lots of bugs in its shutdown process so doing the file delete at scope destruction means it's more likely to happen. --- diff --git a/includes/filerepo/backend/TempFSFile.php b/includes/filerepo/backend/TempFSFile.php index d9c1906bdf..a9e51067fc 100644 --- a/includes/filerepo/backend/TempFSFile.php +++ b/includes/filerepo/backend/TempFSFile.php @@ -41,9 +41,6 @@ class TempFSFile extends FSFile { } } $tmpFile = new self( $path ); - if ( php_sapi_name() != 'cli' ) { - self::$instances[] = $tmpFile; // defer purge till shutdown - } return $tmpFile; }