Merge "Fatal error: Call to a member function getId() on a non-object in /usr/local...
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 28 Apr 2012 22:22:12 +0000 (22:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 28 Apr 2012 22:22:12 +0000 (22:22 +0000)
includes/EditPage.php

index dce8d91..015099a 100644 (file)
@@ -819,7 +819,7 @@ class EditPage {
 
                                                        # If we just undid one rev, use an autosummary
                                                        $firstrev = $oldrev->getNext();
-                                                       if ( $firstrev->getId() == $undo ) {
+                                                       if ( $firstrev && $firstrev->getId() == $undo ) {
                                                                $undoSummary = wfMsgForContent( 'undo-summary', $undo, $undorev->getUserText() );
                                                                if ( $this->summary === '' ) {
                                                                        $this->summary = $undoSummary;