Removed error suppression operators
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 10 Oct 2010 18:18:08 +0000 (18:18 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 10 Oct 2010 18:18:08 +0000 (18:18 +0000)
includes/GlobalFunctions.php

index b32780c..a90c7dc 100644 (file)
@@ -3270,7 +3270,9 @@ function wfWarn( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) {
                if( isset( $callerfunc['class'] ) ) {
                        $func .= $callerfunc['class'] . '::';
                }
-               $func .= @$callerfunc['function'];
+               if( isset( $callerfunc['function'] ) ) {
+                       $func .= $callerfunc['function'];
+               }
                $msg .= " [Called from $func in $file]";
        }
 
@@ -3301,7 +3303,9 @@ function wfWaitForSlaves( $maxLag, $wiki = false ) {
                $lb = wfGetLB( $wiki );
                list( $host, $lag ) = $lb->getMaxLag( $wiki );
                while( $lag > $maxLag ) {
-                       $name = @gethostbyaddr( $host );
+                       wfSuppressWarnings();
+                       $name = gethostbyaddr( $host );
+                       wfRestoreWarnings();
                        if( $name !== false ) {
                                $host = $name;
                        }