From: Aaron Date: Mon, 9 Jul 2012 17:27:53 +0000 (-0700) Subject: Prevent duplicate edits due to failure to load the current revision. X-Git-Tag: 1.31.0-rc.0~23091 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=306bc3956125b3666d45c3d72b2f8ad52bdef4f1;p=lhc%2Fweb%2Fwiklou.git Prevent duplicate edits due to failure to load the current revision. * This works via throwing an exception. Ideally, a deeper fix can be made so the exception stops getting triggered anymore. Change-Id: Ie6a11016be9f9e5a76e2f6f369bc3aac42d78c2d --- diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 43932a7ede..8995f3f767 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -1487,6 +1487,10 @@ class WikiPage extends Page { wfProfileOut( __METHOD__ ); return $status; + } elseif ( $oldtext === false ) { + # Sanity check for bug 37225 + wfProfileOut( __METHOD__ ); + throw new MWException( "Could not find text for current revision {$oldid}." ); } $revision = new Revision( array(