From 72e354b0b91b01a59e50082300fc09b7fb9b24ca Mon Sep 17 00:00:00 2001 From: Reedy Date: Sat, 28 Apr 2012 22:39:00 +0100 Subject: [PATCH] Fatal error: Call to a member function getId() on a non-object in /usr/local/apache/common-local/php-1.20wmf1/includes/EditPage.php on line 822 getNext() can return null! Change-Id: I76a8e50076165d89c90796c6e925913c64722a3a --- includes/EditPage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index dce8d91042..015099a5f6 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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; -- 2.20.1