Matmarex has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/64503


Change subject: updateCollation.php: sanity check the collation before 
proceeding
......................................................................

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
---
M maintenance/updateCollation.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/64503/1

diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php
index 94b2537..6967c40 100644
--- a/maintenance/updateCollation.php
+++ b/maintenance/updateCollation.php
@@ -82,6 +82,10 @@
                        $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();
+
                $options = array(
                        'LIMIT' => self::BATCH_SIZE,
                        'ORDER BY' => 'cl_to, cl_type, cl_from',

-- 
To view, visit https://gerrit.wikimedia.org/r/64503
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77de040f97080653fe0d1734d38490eaa2d322db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to