From: umherirrender Date: Sun, 9 Aug 2015 15:18:54 +0000 (+0200) Subject: Avoid fatal when accessing method of non-objects on Special:Undelete X-Git-Tag: 1.31.0-rc.0~10432^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=846ba518d03e9e3903aa1c3b0384a154c4026179;p=lhc%2Fweb%2Fwiklou.git Avoid fatal when accessing method of non-objects on Special:Undelete Revision::getContent can return null Bug: T108495 Change-Id: I8aca2bd9dd536e7bf5ed49c5a7c0e3673c50385e --- 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