From 1838e6c7e73a6db0cd0cb517576c2a9d9a865993 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Mon, 24 Jul 2017 14:09:33 -0700 Subject: [PATCH] SpecialUndelete: Don't try to add a form to the page unless it exists Bug: T171523 Change-Id: I1083ce168797a698c76c3fdff4eac06edfb0ac6a --- includes/specials/SpecialUndelete.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 810f8fb158..39904b05a1 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -858,11 +858,12 @@ class SpecialUndelete extends SpecialPage { $misc = Html::hidden( 'target', $this->mTarget ); $misc .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ); $history .= $misc; - } - - $form->appendContent( new OOUI\HtmlSnippet( $history ) ); - $out->addHTML( $form ); + $form->appendContent( new OOUI\HtmlSnippet( $history ) ); + $out->addHTML( $form ); + } else { + $out->addHTML( $history ); + } return true; } -- 2.20.1