From: Roan Kattouw Date: Tue, 11 Jan 2011 13:51:49 +0000 (+0000) Subject: Followup r80003: array_unique() preserves keys, so we got module arrays that looked... X-Git-Tag: 1.31.0-rc.0~32627 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=e70787791275c1a68f607cce004214a7d0e23d63;p=lhc%2Fweb%2Fwiklou.git Followup r80003: array_unique() preserves keys, so we got module arrays that looked like {"0": "ext.liquidThreads", "58": "mediawiki.legacy.wikibits", "59": "mediawiki.util", ... } . To prevent this from happening, use array_values() to reindex the arrays --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 6d28ced2b8..d652be89fe 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -233,7 +233,7 @@ class OutputPage { * @return Array of module names */ public function getModules() { - return array_unique( $this->mModules ); + return array_values( array_unique( $this->mModules ) ); } /** @@ -252,7 +252,7 @@ class OutputPage { * @return array of module names */ public function getModuleScripts() { - return array_unique( $this->mModuleScripts ); + return array_values( array_unique( $this->mModuleScripts ) ); } /** @@ -272,7 +272,7 @@ class OutputPage { * @return Array of module names */ public function getModuleStyles() { - return array_unique( $this->mModuleStyles ); + return array_values( array_unique( $this->mModuleStyles ) ); } /** @@ -292,7 +292,7 @@ class OutputPage { * @return Array of module names */ public function getModuleMessages() { - return array_unique( $this->mModuleMessages ); + return array_values( array_unique( $this->mModuleMessages ) ); } /**