From: Alexandre Emsenhuber Date: Mon, 8 Nov 2010 10:22:54 +0000 (+0000) Subject: Removed some error suppression operators X-Git-Tag: 1.31.0-rc.0~34000 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=660d7cc650a48b254523550df2c2963bd92a34d4;p=lhc%2Fweb%2Fwiklou.git Removed some error suppression operators --- diff --git a/includes/Math.php b/includes/Math.php index 09344afcf8..0e136d5f95 100644 --- a/includes/Math.php +++ b/includes/Math.php @@ -154,7 +154,10 @@ class MathRenderer { $hashpath = $this->_getHashPath(); if( !file_exists( $hashpath ) ) { - if( !@wfMkdirParents( $hashpath, 0755 ) ) { + wfSuppressWarnings(); + $ret = wfMkdirParents( $hashpath, 0755 ); + wfRestoreWarnings(); + if( !$ret ) { return $this->_error( 'math_bad_output' ); } } elseif( !is_dir( $hashpath ) || !is_writable( $hashpath ) ) { @@ -232,7 +235,9 @@ class MathRenderer { if( file_exists( $filename ) ) { if( filesize( $filename ) == 0 ) { // Some horrible error corrupted stuff :( - @unlink( $filename ); + wfSuppressWarnings(); + unlink( $filename ); + wfRestoreWarnings(); } else { return true; } @@ -242,7 +247,10 @@ class MathRenderer { $hashpath = $this->_getHashPath(); if( !file_exists( $hashpath ) ) { - if( !@wfMkdirParents( $hashpath, 0755 ) ) { + wfSuppressWarnings(); + $ret = wfMkdirParents( $hashpath, 0755 ); + wfRestoreWarnings(); + if( !$ret ) { return false; } } elseif( !is_dir( $hashpath ) || !is_writable( $hashpath ) ) {