From c497addae1e219c2434f9af69774288043a76056 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 3 Jul 2013 16:23:55 -0700 Subject: [PATCH] Fixed file purge script to handle NULL archive names Change-Id: Icbff842694039e018850f1fa320f6e3d5b403aac --- maintenance/purgeDeletedFiles.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maintenance/purgeDeletedFiles.php b/maintenance/purgeDeletedFiles.php index 86658c52d4..9f2af33d71 100644 --- a/maintenance/purgeDeletedFiles.php +++ b/maintenance/purgeDeletedFiles.php @@ -96,6 +96,9 @@ class PurgeDeletedFiles extends Maintenance { __METHOD__ ); foreach ( $res as $row ) { + if ( $row->fa_archive_name === null ) { + continue; // was not an old version (current version names checked already) + } $ofile = $repo->newFromArchiveName( $file->getTitle(), $row->fa_archive_name ); // If there is an orphaned storage file still there...delete it if ( !$file->exists() && $repo->fileExists( $ofile->getPath() ) ) { -- 2.20.1