jenkins-bot has submitted this change and it was merged.

Change subject: Avoid undefined index when query old block logs with api
......................................................................


Avoid undefined index when query old block logs with api

The isset exists in the gui part since r18992

Bug: T75471
Change-Id: Id560810812560fbdbed061afee1b6c1aadfaaabb
---
M includes/api/ApiQueryLogEvents.php
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiQueryLogEvents.php 
b/includes/api/ApiQueryLogEvents.php
index 7d79680..3cdc53c 100644
--- a/includes/api/ApiQueryLogEvents.php
+++ b/includes/api/ApiQueryLogEvents.php
@@ -311,7 +311,8 @@
                                        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() ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/175777
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id560810812560fbdbed061afee1b6c1aadfaaabb
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Greg Grossmeier <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to