From: Platonides Date: Fri, 20 May 2011 21:42:41 +0000 (+0000) Subject: Do not block the installer (through an unhandled exception) when we can't connect... X-Git-Tag: 1.31.0-rc.0~30053 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=6742dd537ac27fce498d1bc65c2f5c421186b1ff;p=lhc%2Fweb%2Fwiklou.git Do not block the installer (through an unhandled exception) when we can't connect to ourself. --- diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 51d78f6e26..bb87390543 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -1150,7 +1150,13 @@ abstract class Installer { break; } - $text = Http::get( $url . $file, array( 'timeout' => 3 ) ); + try { + $text = Http::get( $url . $file, array( 'timeout' => 3 ) ); + } + catch( MWException $e ) { + // Http::get throws with allow_url_fopen = false and no curl extension. + $text = null; + } unlink( $dir . $file ); if ( $text == 'exec' ) {