From: umherirrender Date: Sat, 17 Nov 2012 21:02:07 +0000 (+0100) Subject: Undefined offset in ApiQueryLogEvents X-Git-Tag: 1.31.0-rc.0~21598^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=e808e38d1b72bbf7c617be6457c40c4d8622e1ae;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;