From e808e38d1b72bbf7c617be6457c40c4d8622e1ae Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 17 Nov 2012 22:02:07 +0100 Subject: [PATCH] Undefined offset in ApiQueryLogEvents Follow up Ie188bc6f: Necessary changes to api for rights log changes Getting for new style logs: Notice: Undefined offset: 1 in \includes\api\ApiQueryLogEvents.php on line 245 Notice: Undefined offset: 0 in \includes\api\ApiQueryLogEvents.php on line 245 Added a legacy part as seen by patrol and move for the rights log action Change-Id: I1d0bdfb483dba30572e8dcf8faac331a77eb04c6 --- includes/api/ApiQueryLogEvents.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 5d85c221a8..e51b5585ca 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -241,7 +241,12 @@ class ApiQueryLogEvents extends ApiQueryBase { break; case 'rights': $vals2 = array(); - list( $vals2['old'], $vals2['new'] ) = $params; + if( $legacy ) { + list( $vals2['old'], $vals2['new'] ) = $params; + } else { + $vals2['new'] = implode( ', ', $params['5::newgroups'] ); + $vals2['old'] = implode( ', ', $params['4::oldgroups'] ); + } $vals[$type] = $vals2; $params = null; break; -- 2.20.1