Followup r106752
authorSam Reed <reedy@users.mediawiki.org>
Sun, 1 Jan 2012 23:33:33 +0000 (23:33 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 1 Jan 2012 23:33:33 +0000 (23:33 +0000)
Use $file in unlink, rather than the undefined $path

includes/filerepo/FileRepo.php

index 46ffb32..75c4882 100644 (file)
@@ -653,7 +653,7 @@ class FileRepo {
                $operations = array();
                $sourceFSFilesToDelete = array(); // cleanup for disk source files
                // Validate each triplet and get the store operation...
-               foreach ( $triplets as $i => $triplet ) {
+               foreach ( $triplets as $triplet ) {
                        list( $srcPath, $dstZone, $dstRel ) = $triplet;
 
                        // Resolve destination path
@@ -760,7 +760,7 @@ class FileRepo {
                // Cleanup for disk source files...
                foreach ( $sourceFSFilesToDelete as $file ) {
                        wfSuppressWarnings();
-                       unlink( $path ); // FS cleanup
+                       unlink( $file ); // FS cleanup
                        wfRestoreWarnings();
                }
        }