From 660d7cc650a48b254523550df2c2963bd92a34d4 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 8 Nov 2010 10:22:54 +0000 Subject: [PATCH] Removed some error suppression operators --- includes/Math.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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 ) ) { -- 2.20.1