From: Alexandre Emsenhuber Date: Sun, 10 Oct 2010 18:18:08 +0000 (+0000) Subject: Removed error suppression operators X-Git-Tag: 1.31.0-rc.0~34545 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=64883748417b97d45acaa324d0dacd5a955f840a;p=lhc%2Fweb%2Fwiklou.git Removed error suppression operators --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index b32780ce79..a90c7dc9e6 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -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; }