r67184 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67183‎ | r67184 | r67185 >
Date:14:28, 1 June 2010
Author:catrope
Status:ok
Tags:
Comment:
CategoryTree: Backport r67183 from 1.16wmf4
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -677,9 +677,9 @@
678678 $attr = array( 'class' => 'CategoryTreeBullet' );
679679
680680 # Get counts, with conversion to integer so === works
681 - $pageCount = intval( $cat->getPageCount() );
682 - $subcatCount = intval( $cat->getSubcatCount() );
683 - $fileCount = intval( $cat->getFileCount() );
 681+ $pageCount = $cat ? intval( $cat->getPageCount() ) : 0;
 682+ $subcatCount = $cat ? intval( $cat->getSubcatCount() ) : 0;
 683+ $fileCount = $cat ? intval( $cat->getFileCount() ) : 0;
684684
685685 if ( $ns == NS_CATEGORY ) {
686686
Property changes on: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
___________________________________________________________________
Added: svn:mergeinfo
687687 Merged /branches/wmf/1.16wmf4/extensions/CategoryTree/CategoryTreeFunctions.php:r67183

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r671831.16wmf4: Fix fatals in CategoryTreecatrope14:25, 1 June 2010

Status & tagging log