From c9e8cffc810bfa84463010f378efeda3bcf73a17 Mon Sep 17 00:00:00 2001 From: MatmaRex Date: Sat, 18 May 2013 21:46:32 +0200 Subject: [PATCH] updateCollation.php: sanity check the collation before proceeding In some cases the constructor will work, but trying to access first letter data will raise an exception, breaking all category pages. Bug: 46615 Change-Id: I77de040f97080653fe0d1734d38490eaa2d322db --- maintenance/updateCollation.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php index b847c23b05..964b3138d7 100644 --- a/maintenance/updateCollation.php +++ b/maintenance/updateCollation.php @@ -82,6 +82,10 @@ TEXT; $collation = Collation::singleton(); } + // Collation sanity check: in some cases the constructor will work, + // but this will raise an exception, breaking all category pages + $collation->getFirstLetter( 'MediaWiki' ); + $options = array( 'LIMIT' => self::BATCH_SIZE, 'ORDER BY' => 'cl_to, cl_type, cl_from', -- 2.20.1