Merge "Follow-up 42333412833a - Fix behaviour $wgVerifyMimeType = false;"
[lhc/web/wiklou.git] / includes / upload / UploadBase.php
index 36e4252..b6ea4c8 100644 (file)
@@ -410,10 +410,10 @@ abstract class UploadBase {
                        return $status;
                }
 
-               if ( $wgVerifyMimeType ) {
-                       $this->mFileProps = FSFile::getPropsFromPath( $this->mTempPath, $this->mFinalExtension );
-                       $mime = $this->mFileProps['file-mime'];
+               $this->mFileProps = FSFile::getPropsFromPath( $this->mTempPath, $this->mFinalExtension );
+               $mime = $this->mFileProps['file-mime'];
 
+               if ( $wgVerifyMimeType ) {
                        # XXX: Missing extension will be caught by validateName() via getTitle()
                        if ( $this->mFinalExtension != '' && !$this->verifyExtension( $mime, $this->mFinalExtension ) ) {
                                wfProfileOut( __METHOD__ );