r103791 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103790‎ | r103791 | r103792 >
Date:22:39, 20 November 2011
Author:hashar
Status:ok
Tags:
Comment:
Special:Log title can be an invalid thus trigger a Fatal error

follow up r103711
Modified paths:
  • /trunk/phase3/includes/specials/SpecialLog.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialLog.php
@@ -102,7 +102,7 @@
103103 if( in_array( $opts->getValue( 'type' ), $this->typeOnUser ) ) {
104104 # ok we have a type of log which expect a user title.
105105 $target = Title::newFromText( $opts->getValue( 'page' ) );
106 - if( $target->getNamespace() === NS_MAIN ) {
 106+ if( $target && $target->getNamespace() === NS_MAIN ) {
107107 # User forgot to add 'User:', we are adding it for him
108108 $opts->setValue( 'page',
109109 Title::makeTitleSafe( NS_USER, $opts->getValue( 'page' ) )

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103711(bug 1697) Special:Log make Title an User object when the log type expect ithashar21:22, 19 November 2011

Status & tagging log