Replaced error suppression operator with wfSuppressWarnings()/wfRestoreWarnings()
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 10 Oct 2010 09:56:54 +0000 (09:56 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 10 Oct 2010 09:56:54 +0000 (09:56 +0000)
includes/GlobalFunctions.php

index 4384504..b32780c 100644 (file)
@@ -2278,7 +2278,8 @@ function wfIncrStats( $key ) {
                        );
                }
                $statline = "stats/{$wgDBname} - 1 1 1 1 1 {$key}\n";
-               @socket_sendto(
+               wfSuppressWarnings();
+               socket_sendto(
                        $socket,
                        $statline,
                        strlen( $statline ),
@@ -2286,6 +2287,7 @@ function wfIncrStats( $key ) {
                        $wgUDPProfilerHost,
                        $wgUDPProfilerPort
                );
+               wfRestoreWarnings();
        } elseif( $wgStatsMethod == 'cache' ) {
                global $wgMemc;
                $key = wfMemcKey( 'stats', $key );