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
This commit is contained in:
mainframe98 2017-05-15 17:17:04 +02:00 committed by Krinkle
parent 6f875daf49
commit a3d2a265c9
2 changed files with 6 additions and 6 deletions

View file

@ -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() );
}
}

View file

@ -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() );
}
}