Fixed warning introduced in r59702
authorMax Semenik <maxsem@users.mediawiki.org>
Thu, 3 Dec 2009 20:18:28 +0000 (20:18 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Thu, 3 Dec 2009 20:18:28 +0000 (20:18 +0000)
includes/filerepo/File.php

index 9968ace..bb34529 100644 (file)
@@ -561,7 +561,10 @@ abstract class File {
 
                        wfDebug( __METHOD__.": Doing stat for $thumbPath\n" );
                        $this->migrateThumbFile( $thumbName );
-                       if ( ( $thumbTime = filemtime( $thumbPath ) ) !== FALSE && gmdate( 'YmdHis', $thumbTime ) >= $wgThumbnailEpoch ) {
+                       if ( file_exists( $thumbPath ) 
+                               && ( $thumbTime = filemtime( $thumbPath ) ) !== FALSE 
+                               && gmdate( 'YmdHis', $thumbTime ) >= $wgThumbnailEpoch )
+                       {
                                $thumb = $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
                                break;
                        }