Merge "Don't check namespace in SpecialWantedtemplates"
[lhc/web/wiklou.git] / includes / media / SVG.php
index c2f85e8..1118598 100644 (file)
@@ -205,11 +205,12 @@ class SvgHandler extends ImageHandler {
                $tmpDir = wfTempDir() . '/svg_' . wfRandomString( 24 );
                $lnPath = "$tmpDir/" . basename( $srcPath );
                $ok = mkdir( $tmpDir, 0771 ) && symlink( $srcPath, $lnPath );
+               /** @noinspection PhpUnusedLocalVariableInspection */
                $cleaner = new ScopedCallback( function () use ( $tmpDir, $lnPath ) {
-                       wfSuppressWarnings();
+                       MediaWiki\suppressWarnings();
                        unlink( $lnPath );
                        rmdir( $tmpDir );
-                       wfRestoreWarnings();
+                       MediaWiki\restoreWarnings();
                } );
                if ( !$ok ) {
                        wfDebugLog( 'thumbnail',
@@ -375,9 +376,9 @@ class SvgHandler extends ImageHandler {
        }
 
        function unpackMetadata( $metadata ) {
-               wfSuppressWarnings();
+               MediaWiki\suppressWarnings();
                $unser = unserialize( $metadata );
-               wfRestoreWarnings();
+               MediaWiki\restoreWarnings();
                if ( isset( $unser['version'] ) && $unser['version'] == self::SVG_METADATA_VERSION ) {
                        return $unser;
                } else {