From: Brion Vibber Date: Wed, 7 Oct 2009 18:18:31 +0000 (+0000) Subject: check that $this->mTitle isn't empty before checking if it's a user css/js page previ... X-Git-Tag: 1.31.0-rc.0~39357 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=81f8225fd2ab1cf84cdfbdf1cf9a29b3bc3f17ec;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 {