From: Aaron Schulz Date: Wed, 3 Jul 2013 23:23:55 +0000 (-0700) Subject: Fixed file purge script to handle NULL archive names X-Git-Tag: 1.31.0-rc.0~19284 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=c497addae1e219c2434f9af69774288043a76056;p=lhc%2Fweb%2Fwiklou.git Fixed file purge script to handle NULL archive names Change-Id: Icbff842694039e018850f1fa320f6e3d5b403aac --- 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() ) ) {