Do not block the installer (through an unhandled exception) when we can't connect...
authorPlatonides <platonides@users.mediawiki.org>
Fri, 20 May 2011 21:42:41 +0000 (21:42 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Fri, 20 May 2011 21:42:41 +0000 (21:42 +0000)
includes/installer/Installer.php

index 51d78f6..bb87390 100644 (file)
@@ -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' ) {