r97138 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97137‎ | r97138 | r97139 >
Date:07:51, 15 September 2011
Author:nikerabbit
Status:ok (Comments)
Tags:
Comment:
This should fix the following PHP notice and the display of some yet another kind of legacy log entries for suppression log
PHP Notice: Undefined offset: 6 in /www/w/includes/logging/LogFormatter.php on line 379
Modified paths:
  • /trunk/phase3/includes/logging/LogFormatter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/logging/LogFormatter.php
@@ -372,7 +372,10 @@
373373 $params = parent::getMessageParameters();
374374 $subtype = $this->entry->getSubtype();
375375 if ( in_array( $subtype, array( 'event', 'revision' ) ) ) {
376 - if ( count( $params ) > 5 ) {
 376+ if (
 377+ ($subtype === 'event' && count( $params ) === 6 ) ||
 378+ ($subtype === 'revision' && $params[3] === 'revision' )
 379+ ) {
377380 $paramStart = $subtype === 'revision' ? 4 : 3;
378381
379382 $old = $this->parseBitField( $params[$paramStart+1] );

Follow-up revisions

RevisionCommit summaryAuthorDate
r97173Merged revisions 97087,97091-97092,97094,97096-97098,97100-97101,97103,97136,...dantman16:19, 15 September 2011
r98738Followup r97138 - could not reproduce myselfnikerabbit03:35, 3 October 2011

Comments

#Comment by Raymond (talk | contribs)   11:06, 29 September 2011

[29-Sep-2011 10:22:59] PHP Notice: Undefined offset: 3 in /www/w/includes/logging/LogFormatter.php on line 381

Status & tagging log