r77760 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77759‎ | r77760 | r77761 >
Date:04:13, 5 December 2010
Author:demon
Status:reverted (Comments)
Tags:
Comment:
Style cleanup to r64922
Modified paths:
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -980,8 +980,7 @@
981981 }
982982
983983 if( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK ) {
984 - $parts = explode( '/', $this->mTitle->getText() );
985 - $rootUser = $parts[0];
 984+ $rootUser = explode( '/', $this->mTitle->getText(), 1 );
986985 $id = User::idFromName( $rootUser );
987986 $ip = User::isIP( $rootUser );
988987 } else {

Follow-up revisions

RevisionCommit summaryAuthorDate
r77789Revert r77760, broken, and do what it intended correctly with strtok().catrope10:30, 5 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64922Fix so that toolbox entries correctly show on user subpagesoverlordq05:19, 11 April 2010

Comments

#Comment by Nikerabbit (talk | contribs)   09:33, 5 December 2010

Doesn't make sense: explode with limit 1 doesn't do anything to the string, except that it returns an array.

#Comment by Nikerabbit (talk | contribs)   09:55, 5 December 2010

Likely cause for this error: [05-Dec-2010 09:47:20] PHP Warning: preg_match() expects parameter 2 to be string, array given in /www/w/includes/IP.php on line 94

Status & tagging log