From: mainframe98 Date: Mon, 15 May 2017 15:17:04 +0000 (+0200) Subject: installer: Replace bad calls to getText() on DBQueryError exceptions X-Git-Tag: 1.31.0-rc.0~3154^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=a3d2a265c998b7bc160903c9572347df81277c04;p=lhc%2Fweb%2Fwiklou.git installer: Replace bad calls to getText() on DBQueryError exceptions The called method does not exist. Replaced with getMessage(), similar to PostgresInstaller.php. Bug: T165319 Change-Id: I900ec8c18307ce6f9e8c9f4cda79b1e33ed66dff --- diff --git a/includes/installer/MssqlInstaller.php b/includes/installer/MssqlInstaller.php index ba9818d11c..43d3574152 100644 --- a/includes/installer/MssqlInstaller.php +++ b/includes/installer/MssqlInstaller.php @@ -577,7 +577,7 @@ class MssqlInstaller extends DatabaseInstaller { $grantableNames[] = $dbUser; } catch ( DBQueryError $dqe ) { $this->db->rollback(); - $status->warning( 'config-install-user-create-failed', $dbUser, $dqe->getText() ); + $status->warning( 'config-install-user-create-failed', $dbUser, $dqe->getMessage() ); } } elseif ( !$this->userExists( $dbUser ) ) { try { @@ -588,7 +588,7 @@ class MssqlInstaller extends DatabaseInstaller { $grantableNames[] = $dbUser; } catch ( DBQueryError $dqe ) { $this->db->rollback(); - $status->warning( 'config-install-user-create-failed', $dbUser, $dqe->getText() ); + $status->warning( 'config-install-user-create-failed', $dbUser, $dqe->getMessage() ); } } else { $status->warning( 'config-install-user-alreadyexists', $dbUser ); @@ -620,7 +620,7 @@ class MssqlInstaller extends DatabaseInstaller { $this->db->commit(); } catch ( DBQueryError $dqe ) { $this->db->rollback(); - $status->fatal( 'config-install-user-grant-failed', $dbUser, $dqe->getText() ); + $status->fatal( 'config-install-user-grant-failed', $dbUser, $dqe->getMessage() ); } // Also try to grant SHOWPLAN on the db, but don't fail if we can't // (just makes a couple things in mediawiki run slower since @@ -646,7 +646,7 @@ class MssqlInstaller extends DatabaseInstaller { $this->db->query( "CREATE FULLTEXT INDEX ON $searchindex (si_title, si_text) " . "KEY INDEX si_page ON $schema" ); } catch ( DBQueryError $dqe ) { - $status->fatal( 'config-install-tables-failed', $dqe->getText() ); + $status->fatal( 'config-install-tables-failed', $dqe->getMessage() ); } } diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php index 09051f410d..64a4077f81 100644 --- a/includes/installer/MysqlInstaller.php +++ b/includes/installer/MysqlInstaller.php @@ -574,7 +574,7 @@ class MysqlInstaller extends DatabaseInstaller { // If we couldn't create for some bizzare reason and the // user probably doesn't exist, skip the grant $this->db->rollback( __METHOD__ ); - $status->warning( 'config-install-user-create-failed', $dbUser, $dqe->getText() ); + $status->warning( 'config-install-user-create-failed', $dbUser, $dqe->getMessage() ); } } } else { @@ -594,7 +594,7 @@ class MysqlInstaller extends DatabaseInstaller { $this->db->commit( __METHOD__ ); } catch ( DBQueryError $dqe ) { $this->db->rollback( __METHOD__ ); - $status->fatal( 'config-install-user-grant-failed', $dbUser, $dqe->getText() ); + $status->fatal( 'config-install-user-grant-failed', $dbUser, $dqe->getMessage() ); } }