This should fix the following PHP notice and the display of some yet another kind...
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 15 Sep 2011 07:51:25 +0000 (07:51 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 15 Sep 2011 07:51:25 +0000 (07:51 +0000)
PHP Notice:  Undefined offset: 6 in /www/w/includes/logging/LogFormatter.php on line 379

includes/logging/LogFormatter.php

index 48ba4e7..4efda39 100644 (file)
@@ -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] );