r51178 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51177‎ | r51178 | r51179 >
Date:05:14, 30 May 2009
Author:philip
Status:ok
Tags:
Comment:
Follow up on r51177. Need use is_array().
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -1500,7 +1500,8 @@
15011501 // array_values: We needn't to merge variant's code name
15021502 // into $this->mKeywords;
15031503 // array_unique: We should insert a keyword just for once
1504 - $text = array_unique( array_values( $text ));
 1504+ if( is_array( $text ))
 1505+ $text = array_unique( array_values( $text ));
15051506 $this->addKeyword( $text );
15061507 $count = 1;
15071508 $links2d =& $parserOutput->getLinks();
@@ -1510,7 +1511,8 @@
15111512 foreach ( $links2d as $dbkeys ) {
15121513 foreach( $dbkeys as $dbkey => $unused ) {
15131514 $dbkey = $wgContLang->autoConvertToAllVariants( $dbkey );
1514 - $dbkey = array_unique( array_values( $dbkey ));
 1515+ if( is_array( $dbkey ))
 1516+ $dbkey = array_unique( array_values( $dbkey ));
15151517 $this->addKeyword( $dbkey );
15161518 if ( ++$count > 10 ) {
15171519 break 2;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r511771. Follow up on r49157, r50902 and r50938. According RFC 2616 section 14.4, l...philip05:07, 30 May 2009

Status & tagging log