From: LukBukkit Date: Fri, 16 Nov 2018 22:54:59 +0000 (+0100) Subject: Improve display of an SQL error during the installation X-Git-Tag: 1.34.0-rc.0~3494^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22calendrier%22%2C%22type=semaine%22%29%20.%20%22?a=commitdiff_plain;h=76663a22f798971f68266ff2bb4f118549e2aa79;p=lhc%2Fweb%2Fwiklou.git Improve display of an SQL error during the installation This commit moves the call of the DatabaseUpdater::purgeCache function into a try catch block which ensures that the error will be displayed nicely. Bug: T209341 Change-Id: I614444140e29948c41baa30dd557483b63f21a9a --- diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index e6ee70edfd..a146ae4ae8 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -382,6 +382,7 @@ abstract class DatabaseInstaller { $up = DatabaseUpdater::newForDB( $this->db ); try { $up->doUpdates(); + $up->purgeCache(); } catch ( MWException $e ) { echo "\nAn error occurred:\n"; echo $e->getText(); @@ -391,7 +392,6 @@ abstract class DatabaseInstaller { echo $e->getMessage(); $ret = false; } - $up->purgeCache(); ob_end_flush(); return $ret;