From: Reedy Date: Sat, 28 Apr 2012 21:39:00 +0000 (+0100) Subject: Fatal error: Call to a member function getId() on a non-object in /usr/local/apache... X-Git-Tag: 1.31.0-rc.0~23785^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=72e354b0b91b01a59e50082300fc09b7fb9b24ca;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;