Avoid undefined index when query old block logs with api
authorumherirrender <umherirrender_de.wp@web.de>
Tue, 25 Nov 2014 18:40:03 +0000 (19:40 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Tue, 6 Jan 2015 21:31:38 +0000 (21:31 +0000)
The isset exists in the gui part since r18992

Bug: T75471
Change-Id: Id560810812560fbdbed061afee1b6c1aadfaaabb

includes/api/ApiQueryLogEvents.php

index 7d79680..3cdc53c 100644 (file)
@@ -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() ) {