From: Niklas Laxström Date: Thu, 15 Sep 2011 07:51:25 +0000 (+0000) Subject: This should fix the following PHP notice and the display of some yet another kind... X-Git-Tag: 1.31.0-rc.0~27652 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=195532363630052862de53bcbedbd8cdfe14194d;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/logging/LogFormatter.php b/includes/logging/LogFormatter.php index 48ba4e7a1b..4efda39655 100644 --- a/includes/logging/LogFormatter.php +++ b/includes/logging/LogFormatter.php @@ -372,7 +372,10 @@ class DeleteLogFormatter extends LogFormatter { $params = parent::getMessageParameters(); $subtype = $this->entry->getSubtype(); if ( in_array( $subtype, array( 'event', 'revision' ) ) ) { - if ( count( $params ) > 5 ) { + if ( + ($subtype === 'event' && count( $params ) === 6 ) || + ($subtype === 'revision' && $params[3] === 'revision' ) + ) { $paramStart = $subtype === 'revision' ? 4 : 3; $old = $this->parseBitField( $params[$paramStart+1] );