$img = wfLocalFile( $fileName );
}
+ // Check the source file title
+ if ( !$img ) {
+ wfThumbError( 404, wfMessage( 'badtitletext' )->text() );
+ wfProfileOut( __METHOD__ );
+ return;
+ }
+
// Check permissions if there are read restrictions
$varyHeader = array();
if ( !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) ) {
}
// Check the source file storage path
- if ( !$img ) {
- wfThumbError( 404, wfMessage( 'badtitletext' )->text() );
- wfProfileOut( __METHOD__ );
- return;
- }
if ( !$img->exists() ) {
wfThumbError( 404, 'The source file for the specified thumbnail does not exist.' );
wfProfileOut( __METHOD__ );