From 6742dd537ac27fce498d1bc65c2f5c421186b1ff Mon Sep 17 00:00:00 2001 From: Platonides Date: Fri, 20 May 2011 21:42:41 +0000 Subject: [PATCH] Do not block the installer (through an unhandled exception) when we can't connect to ourself. --- includes/installer/Installer.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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' ) { -- 2.20.1