$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',
}
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 {