From 195532363630052862de53bcbedbd8cdfe14194d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Thu, 15 Sep 2011 07:51:25 +0000 Subject: [PATCH] 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 --- includes/logging/LogFormatter.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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] ); -- 2.20.1