X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmedia%2FSVG.php;h=1118598f88d6c187df1dda3a7ef03690ed74fafb;hb=1f2706b49939bfc85ec5abc8ccc24aacd938eed0;hp=c2f85e8394d247dcb51ccf36ad7f446b550c2f90;hpb=6989663bbc53c59e0f931a9f112798ea9cccd5e4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/SVG.php b/includes/media/SVG.php index c2f85e8394..1118598f88 100644 --- a/includes/media/SVG.php +++ b/includes/media/SVG.php @@ -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 {