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

Change subject: Unblock form handling: Check for 'Tags' index in $data from UI 
before trying to access it
......................................................................


Unblock form handling: Check for 'Tags' index in $data from UI before trying to 
access it

Was showing this notice:
Undefined index: Tags in /path/to/mw/includes/specials/SpecialUnblock.php on 
line 241

The API sets this but the UI does not

Change-Id: Ibf31c2b9be4d4b621d1745fd87550a383c389f12
---
M includes/specials/SpecialUnblock.php
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Florianschmidtwelzow: Looks good to me, approved
  Glaisher: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialUnblock.php 
b/includes/specials/SpecialUnblock.php
index cc7a091..cff8bf4 100644
--- a/includes/specials/SpecialUnblock.php
+++ b/includes/specials/SpecialUnblock.php
@@ -238,7 +238,9 @@
                $logEntry->setTarget( $page );
                $logEntry->setComment( $data['Reason'] );
                $logEntry->setPerformer( $performer );
-               $logEntry->setTags( $data['Tags'] );
+               if ( isset( $data['Tags'] ) ) {
+                       $logEntry->setTags( $data['Tags'] );
+               }
                $logId = $logEntry->insert();
                $logEntry->publish( $logId );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf31c2b9be4d4b621d1745fd87550a383c389f12
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Glaisher <[email protected]>
Gerrit-Reviewer: TTO <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to