Merge "FauxRequest: Avoid header leak"
[lhc/web/wiklou.git] / includes / utils / UIDGenerator.php
index cb32357..04c8e19 100644 (file)
@@ -52,7 +52,7 @@ class UIDGenerator {
                }
                // Try to get some ID that uniquely identifies this machine (RFC 4122)...
                if ( !preg_match( '/^[0-9a-f]{12}$/i', $nodeId ) ) {
-                       wfSuppressWarnings();
+                       MediaWiki\suppressWarnings();
                        if ( wfIsWindows() ) {
                                // http://technet.microsoft.com/en-us/library/bb490913.aspx
                                $csv = trim( wfShellExec( 'getmac /NH /FO CSV' ) );
@@ -66,7 +66,7 @@ class UIDGenerator {
                                        wfShellExec( '/sbin/ifconfig -a' ), $m );
                                $nodeId = isset( $m[1] ) ? str_replace( ':', '', $m[1] ) : '';
                        }
-                       wfRestoreWarnings();
+                       MediaWiki\restoreWarnings();
                        if ( !preg_match( '/^[0-9a-f]{12}$/i', $nodeId ) ) {
                                $nodeId = MWCryptRand::generateHex( 12, true );
                                $nodeId[1] = dechex( hexdec( $nodeId[1] ) | 0x1 ); // set multicast bit
@@ -283,7 +283,7 @@ class UIDGenerator {
                $cache = null;
                if ( ( $flags & self::QUICK_VOLATILE ) && PHP_SAPI !== 'cli' ) {
                        try {
-                               $cache = ObjectCache::newAccelerator( array() );
+                               $cache = ObjectCache::newAccelerator();
                        } catch ( Exception $e ) {
                                // not supported
                        }