Introduced in
603d8970c3575 to handle purging of tmp files
in case of fatals and other ways that the PHP process can exit
in a way that (some) destructors might not run, but shutdown
callbacks do.
It did not appear to work as it looped over the array values,
which are all int(1), instead of the array keys.
Change-Id: I83f0c8ea15e2bfb2bdc9aa2b4015635771abe394
* This method should only be called internally
*/
public static function purgeAllOnShutdown() {
- foreach ( self::$pathsCollect as $path ) {
+ foreach ( self::$pathsCollect as $path => $unused ) {
Wikimedia\suppressWarnings();
unlink( $path );
Wikimedia\restoreWarnings();