From: umherirrender Date: Tue, 25 Nov 2014 18:40:03 +0000 (+0100) Subject: Avoid undefined index when query old block logs with api X-Git-Tag: 1.31.0-rc.0~12409^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=4d1d9f65021c60eccb1295a13565d8d7fd926966;p=lhc%2Fweb%2Fwiklou.git Avoid undefined index when query old block logs with api The isset exists in the gui part since r18992 Bug: T75471 Change-Id: Id560810812560fbdbed061afee1b6c1aadfaaabb --- diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 7d7968027b..3cdc53caf2 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -311,7 +311,8 @@ class ApiQueryLogEvents extends ApiQueryBase { break; } $vals2 = array(); - list( $vals2['duration'], $vals2['flags'] ) = $params; + $vals2['duration'] = $params[0]; + $vals2['flags'] = isset( $params[1] ) ? $params[1] : ''; // Indefinite blocks have no expiry time if ( SpecialBlock::parseExpiryInput( $params[0] ) !== wfGetDB( DB_SLAVE )->getInfinity() ) {