r109636 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109635‎ | r109636 | r109637 >
Date:19:09, 20 January 2012
Author:nikerabbit
Status:ok
Tags:core, lamecommitsummary 
Comment:
Can't PHP just DWIM? Ping r109628
Modified paths:
  • /trunk/phase3/includes/logging/LogFormatter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/logging/LogFormatter.php
@@ -178,10 +178,12 @@
179179 * Fill in missing indexes with empty strings to avoid
180180 * incorrect renumbering.
181181 */
182 - $max = max( array_keys( $params ) );
183 - for ( $i = 4; $i < $max; $i++ ) {
184 - if ( !isset( $params[$i] ) ) {
185 - $params[$i] = '';
 182+ if ( count( $params ) ) {
 183+ $max = max( array_keys( $params ) );
 184+ for ( $i = 4; $i < $max; $i++ ) {
 185+ if ( !isset( $params[$i] ) ) {
 186+ $params[$i] = '';
 187+ }
186188 }
187189 }
188190 return $params;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109628Reducy query flood in r96546. Allow formatters to provide titles for LinkBatch.nikerabbit16:57, 20 January 2012

Status & tagging log