From fbc870b2497352b1fc498905865475803ad311ca Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 18 Apr 2015 11:25:54 +0200 Subject: [PATCH] Fix very old log params of log type rights for new api logparam style After I9109a27f416b002e5c562a1454d8c373dcf98fb4 list=logevents also called the log formatter for empty params, which than result in a undefined index warning, because log entry without log params can exists for the rights log type. Follow-Up: I4762743b3f43e6ebd806d3ae516507ae66478e96 Change-Id: I169a00f0e39fe88d23111b62f18a9f5cf60866dc --- includes/logging/RightsLogFormatter.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/logging/RightsLogFormatter.php b/includes/logging/RightsLogFormatter.php index f69530ccd7..352bda58ca 100644 --- a/includes/logging/RightsLogFormatter.php +++ b/includes/logging/RightsLogFormatter.php @@ -116,8 +116,13 @@ class RightsLogFormatter extends LogFormatter { } } - $params['4:array:oldgroups'] = $this->makeGroupArray( $params['4:array:oldgroups'] ); - $params['5:array:newgroups'] = $this->makeGroupArray( $params['5:array:newgroups'] ); + // Really old entries does not have log params + if ( isset( $params['4:array:oldgroups'] ) ) { + $params['4:array:oldgroups'] = $this->makeGroupArray( $params['4:array:oldgroups'] ); + } + if ( isset( $params['5:array:newgroups'] ) ) { + $params['5:array:newgroups'] = $this->makeGroupArray( $params['5:array:newgroups'] ); + } return $params; } -- 2.20.1