r89704 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89703‎ | r89704 | r89705 >
Date:22:18, 7 June 2011
Author:yaron
Status:deferred
Tags:
Comment:
Added in small check
Modified paths:
  • /trunk/extensions/SelectCategory/SelectCategory_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SelectCategory/SelectCategory_body.php
@@ -187,7 +187,7 @@
188188
189189 # Get current namespace (save duplicate call of method)
190190 $namespace = $wgTitle->getNamespace();
191 - if( $namespace >= 0 && $wgSelectCategoryRoot[$namespace] ) {
 191+ if( $namespace >= 0 && array_key_exists( $namespace, $wgSelectCategoryRoot ) && $wgSelectCategoryRoot[$namespace] ) {
192192 # Include root and step into the recursion
193193 $allCats = array_merge( array( $wgSelectCategoryRoot[$namespace] => 0 ),
194194 self::getChildren( $wgSelectCategoryRoot[$namespace] ) );

Status & tagging log