From 4d1d9f65021c60eccb1295a13565d8d7fd926966 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Tue, 25 Nov 2014 19:40:03 +0100 Subject: [PATCH] Avoid undefined index when query old block logs with api The isset exists in the gui part since r18992 Bug: T75471 Change-Id: Id560810812560fbdbed061afee1b6c1aadfaaabb --- includes/api/ApiQueryLogEvents.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() ) { -- 2.20.1