From: Jeroen De Dauw Date: Wed, 21 Jul 2010 17:24:39 +0000 (+0000) Subject: @ -> wfSuppressWarnings and wfRestoreWarnings X-Git-Tag: 1.31.0-rc.0~36025 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=6ec41fe065ba34be038bc4c99637bc59746fe3ae;p=lhc%2Fweb%2Fwiklou.git @ -> wfSuppressWarnings and wfRestoreWarnings --- diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index b609ce81bc..b4cfe4ac50 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -654,7 +654,11 @@ abstract class Installer { foreach ( $names as $name ) { $command = "$path/$name"; - if ( @file_exists( $command ) ) { + wfSuppressWarnings(); + $file_exists = file_exists( $command ); + wfRestoreWarnings(); + + if ( $file_exists ) { if ( !$versionInfo ) { return $command; } @@ -677,9 +681,15 @@ abstract class Installer { */ public function envCheckGraphics() { $imcheck = array( "/usr/bin", "/opt/csw/bin", "/usr/local/bin", "/sw/bin", "/opt/local/bin" ); + foreach( $imcheck as $dir ) { $im = "$dir/convert"; - if( @file_exists( $im ) ) { + + wfSuppressWarnings(); + $file_exists = file_exists( $im ); + wfRestoreWarnings(); + + if( $file_exists ) { $this->showMessage( 'config-imagemagick', $im ); $this->setVar( 'wgImageMagickConvertCommand', $im ); return true;