From 81f8225fd2ab1cf84cdfbdf1cf9a29b3bc3f17ec Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 7 Oct 2009 18:18:31 +0000 Subject: [PATCH] check that $this->mTitle isn't empty before checking if it's a user css/js page preview; fatal errors visible in logs from bad cases --- includes/OutputPage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 79f1dbd792..dc397bf8a0 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1819,7 +1819,7 @@ class OutputPage { //add user js if enabled: if( $this->isUserJsAllowed() && $wgUser->isLoggedIn() ) { $action = $wgRequest->getVal( 'action', 'view' ); - if( $this->mTitle->isJsSubpage() and $sk->userCanPreview( $action ) ) { + if( $this->mTitle && $this->mTitle->isJsSubpage() and $sk->userCanPreview( $action ) ) { # XXX: additional security check/prompt? $this->addInlineScript( $wgRequest->getText( 'wpTextbox1' ) ); } else { -- 2.20.1