Merge "Add SPARQL client to core"
[lhc/web/wiklou.git] / includes / MediaWiki.php
index b1b1a7a..6c932d2 100644 (file)
@@ -548,6 +548,9 @@ class MediaWiki {
                                }
                        }
 
+                       MWExceptionHandler::handleException( $e );
+               } catch ( Error $e ) {
+                       // Type errors and such: at least handle it now and clean up the LBFactory state
                        MWExceptionHandler::handleException( $e );
                }
 
@@ -731,10 +734,12 @@ class MediaWiki {
                if ( function_exists( 'register_postsend_function' ) ) {
                        // https://github.com/facebook/hhvm/issues/1230
                        register_postsend_function( $callback );
+                       /** @noinspection PhpUnusedLocalVariableInspection */
                        $blocksHttpClient = false;
                } else {
                        if ( function_exists( 'fastcgi_finish_request' ) ) {
                                fastcgi_finish_request();
+                               /** @noinspection PhpUnusedLocalVariableInspection */
                                $blocksHttpClient = false;
                        } else {
                                // Either all DB and deferred updates should happen or none.
@@ -1026,7 +1031,7 @@ class MediaWiki {
                        $port = $info['port'];
                }
 
-               MediaWiki\suppressWarnings();
+               Wikimedia\suppressWarnings();
                $sock = $host ? fsockopen(
                        $host,
                        $port,
@@ -1035,7 +1040,7 @@ class MediaWiki {
                        // If it takes more than 100ms to connect to ourselves there is a problem...
                        0.100
                ) : false;
-               MediaWiki\restoreWarnings();
+               Wikimedia\restoreWarnings();
 
                $invokedWithSuccess = true;
                if ( $sock ) {