Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -1500,7 +1500,8 @@ |
1501 | 1501 | // array_values: We needn't to merge variant's code name |
1502 | 1502 | // into $this->mKeywords; |
1503 | 1503 | // 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 )); |
1505 | 1506 | $this->addKeyword( $text ); |
1506 | 1507 | $count = 1; |
1507 | 1508 | $links2d =& $parserOutput->getLinks(); |
— | — | @@ -1510,7 +1511,8 @@ |
1511 | 1512 | foreach ( $links2d as $dbkeys ) { |
1512 | 1513 | foreach( $dbkeys as $dbkey => $unused ) { |
1513 | 1514 | $dbkey = $wgContLang->autoConvertToAllVariants( $dbkey ); |
1514 | | - $dbkey = array_unique( array_values( $dbkey )); |
| 1515 | + if( is_array( $dbkey )) |
| 1516 | + $dbkey = array_unique( array_values( $dbkey )); |
1515 | 1517 | $this->addKeyword( $dbkey ); |
1516 | 1518 | if ( ++$count > 10 ) { |
1517 | 1519 | break 2; |