Remove deprecated variable usage from Maintenance.php
authorBill Pirkle <bpirkle@wikimedia.org>
Wed, 1 Aug 2018 14:21:13 +0000 (09:21 -0500)
committerBill Pirkle <bpirkle@wikimedia.org>
Wed, 1 Aug 2018 15:52:10 +0000 (10:52 -0500)
Idead2c11c4 deprecated and made nonfunctional the
$wgShowSQLErrors variable, but failed to remove its
usage from Maintenance.php.
This commit removes that usage and replaces it with the
new perferred method of enabling detailed output.

Bug: T165768
Change-Id: I98620ddd493703863755f426dd54f7a4e5ae05f1

maintenance/Maintenance.php

index c4a7594..d919249 100644 (file)
@@ -1118,7 +1118,7 @@ abstract class Maintenance {
         * Handle some last-minute setup here.
         */
        public function finalSetup() {
-               global $wgCommandLineMode, $wgShowSQLErrors, $wgServer;
+               global $wgCommandLineMode, $wgServer, $wgShowExceptionDetails, $wgShowHostnames;
                global $wgDBadminuser, $wgDBadminpassword, $wgDBDefaultGroup;
                global $wgDBuser, $wgDBpassword, $wgDBservers, $wgLBFactoryConf;
 
@@ -1177,7 +1177,8 @@ abstract class Maintenance {
 
                $this->afterFinalSetup();
 
-               $wgShowSQLErrors = true;
+               $wgShowExceptionDetails = true;
+               $wgShowHostnames = true;
 
                Wikimedia\suppressWarnings();
                set_time_limit( 0 );