From 6ec41fe065ba34be038bc4c99637bc59746fe3ae Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Wed, 21 Jul 2010 17:24:39 +0000 Subject: [PATCH] @ -> wfSuppressWarnings and wfRestoreWarnings --- includes/installer/Installer.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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; -- 2.20.1