(Bug 41436) Tone down sanity check, just warn, don't die.
authordaniel <daniel.kinzler@wikimedia.de>
Mon, 29 Oct 2012 18:51:50 +0000 (19:51 +0100)
committerdaniel <daniel.kinzler@wikimedia.de>
Mon, 29 Oct 2012 18:51:50 +0000 (19:51 +0100)
This is a follow-up to I9db228c3 fixing an issue with undelete:

Page ID 47009 mismatches the ID 47010 provided by the Title object.

Backtrace:

0 /var/www/CephWiki/core/includes/Revision.php(188): Revision->__construct(Array)
1 /var/www/CephWiki/core/includes/specials/SpecialUndelete.php(548): Revision::newFromArchiveRow(Object(stdClass), Array)
2 /var/www/CephWiki/core/includes/specials/SpecialUndelete.php(381): PageArchive->undeleteRevisions(Array, false, '')
3 /var/www/CephWiki/core/includes/specials/SpecialUndelete.php(1510): PageArchive->undelete(Array, '', Array, false, Object(User))
4 /var/www/CephWiki/core/includes/specials/SpecialUndelete.php(778): SpecialUndelete->undelete()
5 /var/www/CephWiki/core/includes/SpecialPage.php(599): SpecialUndelete->execute(NULL)

Change-Id: I0517c5826bcba2a85fee596b0473a16da26c3b2f

includes/Revision.php

index 431be69..afba498 100644 (file)
@@ -607,7 +607,7 @@ class Revision implements IDBAccessObject {
                                        $this->mPage = $this->mTitle->getArticleID();
                                } elseif ( $this->mTitle->getArticleID() !== $this->mPage ) {
                                        // got different page IDs, something is wrong.
-                                       throw new MWException( "Page ID " . $this->mPage . " mismatches the ID "
+                                       wfWarn( "Page ID " . $this->mPage . " mismatches the ID "
                                                        . $this->mTitle->getArticleID() . " provided by the Title object." );
                                }
                        }