r67183 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67182‎ | r67183 | r67184 >
Date:14:25, 1 June 2010
Author:catrope
Status:deferred
Tags:
Comment:
1.16wmf4: Fix fatals in CategoryTree
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/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

Follow-up revisions

RevisionCommit summaryAuthorDate
r67184CategoryTree: Backport r67183 from 1.16wmf4catrope14:28, 1 June 2010

Status & tagging log