From: Philip Tzou Date: Sat, 30 May 2009 05:14:24 +0000 (+0000) Subject: Follow up on r51177. Need use is_array(). X-Git-Tag: 1.31.0-rc.0~41606 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=8a2d96a4b3e6450fa98d2d541b982cad7630fd34;p=lhc%2Fweb%2Fwiklou.git Follow up on r51177. Need use is_array(). --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 6f56a33f38..3d860f700a 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1500,7 +1500,8 @@ class OutputPage { // array_values: We needn't to merge variant's code name // into $this->mKeywords; // array_unique: We should insert a keyword just for once - $text = array_unique( array_values( $text )); + if( is_array( $text )) + $text = array_unique( array_values( $text )); $this->addKeyword( $text ); $count = 1; $links2d =& $parserOutput->getLinks(); @@ -1510,7 +1511,8 @@ class OutputPage { foreach ( $links2d as $dbkeys ) { foreach( $dbkeys as $dbkey => $unused ) { $dbkey = $wgContLang->autoConvertToAllVariants( $dbkey ); - $dbkey = array_unique( array_values( $dbkey )); + if( is_array( $dbkey )) + $dbkey = array_unique( array_values( $dbkey )); $this->addKeyword( $dbkey ); if ( ++$count > 10 ) { break 2;