Index: trunk/phase3/includes/filerepo/FSRepo.php |
— | — | @@ -214,6 +214,11 @@ |
215 | 215 | $dstDir = dirname( $dstPath ); |
216 | 216 | if ( !is_dir( $dstDir ) ) wfMkdirParents( $dstDir ); |
217 | 217 | |
| 218 | + // Check if the source is missing before we attempt to move the dest to archive |
| 219 | + if ( !is_file( $srcPath ) ) { |
| 220 | + return new WikiErrorMsg( 'filenotfound', wfEscapeWikiText( $srcPath ) ); |
| 221 | + } |
| 222 | + |
218 | 223 | if( is_file( $dstPath ) ) { |
219 | 224 | $archiveDir = dirname( $archivePath ); |
220 | 225 | if ( !is_dir( $archiveDir ) ) wfMkdirParents( $archiveDir ); |