From f1052ff5283f1ffc5647bbc997e3c235e5b51550 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 9 Feb 2012 23:56:48 +0000 Subject: [PATCH] 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. --- includes/filerepo/backend/TempFSFile.php | 3 --- 1 file changed, 3 deletions(-) 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; } -- 2.20.1