check that $this->mTitle isn't empty before checking if it's a user css/js page previ...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 7 Oct 2009 18:18:31 +0000 (18:18 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 7 Oct 2009 18:18:31 +0000 (18:18 +0000)
includes/OutputPage.php

index 79f1dbd..dc397bf 100644 (file)
@@ -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 {