From 846ba518d03e9e3903aa1c3b0384a154c4026179 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 9 Aug 2015 17:18:54 +0200 Subject: [PATCH] Avoid fatal when accessing method of non-objects on Special:Undelete Revision::getContent can return null Bug: T108495 Change-Id: I8aca2bd9dd536e7bf5ed49c5a7c0e3673c50385e --- includes/specials/SpecialUndelete.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index d7e75bc668..6ae488166a 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -999,7 +999,7 @@ class SpecialUndelete extends SpecialPage { return; } - if ( $this->mPreview || !$isText ) { + if ( ( $this->mPreview || !$isText ) && $content ) { // NOTE: non-text content has no source view, so always use rendered preview // Hide [edit]s -- 2.20.1