Revert "(Bug 41436) Tone down sanity check, just warn, don't die."
authorRobLa <robla@wikimedia.org>
Thu, 1 Nov 2012 04:58:19 +0000 (04:58 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 1 Nov 2012 04:58:19 +0000 (04:58 +0000)
This reverts commit 770b6519bedcfdae9fe6debb22b349a61b84ab28

This seems to have introduced bug 41606.  By reverting, we get an exception rather than complete data loss.

includes/Revision.php

index afba498..431be69 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.
-                                       wfWarn( "Page ID " . $this->mPage . " mismatches the ID "
+                                       throw new MWException( "Page ID " . $this->mPage . " mismatches the ID "
                                                        . $this->mTitle->getArticleID() . " provided by the Title object." );
                                }
                        }