Replace MimeMagic::singleton() calls
[lhc/web/wiklou.git] / includes / filerepo / FileRepo.php
index dc36e50..5d22b8d 100644 (file)
@@ -1543,7 +1543,7 @@ class FileRepo {
         */
        public function getFileProps( $virtualUrl ) {
                $fsFile = $this->getLocalReference( $virtualUrl );
-               $mwProps = new MWFileProps( MimeMagic::singleton() );
+               $mwProps = new MWFileProps( MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer() );
                if ( $fsFile ) {
                        $props = $mwProps->getPropsFromPath( $fsFile->getPath(), true );
                } else {
@@ -1603,7 +1603,7 @@ class FileRepo {
                $params = [ 'src' => $path, 'headers' => $headers, 'options' => $optHeaders ];
 
                // T172851: HHVM does not flush the output properly, causing OOM
-               ob_start( NULL, 1048576 );
+               ob_start( null, 1048576 );
                ob_implicit_flush( true );
 
                $status = $this->newGood();