From a1dfe476c3686598fdf347ecc93502c5a47423f5 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Fri, 25 Mar 2016 04:05:39 +0000 Subject: [PATCH] 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 --- includes/specials/SpecialUnblock.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialUnblock.php b/includes/specials/SpecialUnblock.php index cc7a09146f..cff8bf463a 100644 --- a/includes/specials/SpecialUnblock.php +++ b/includes/specials/SpecialUnblock.php @@ -238,7 +238,9 @@ class SpecialUnblock extends SpecialPage { $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 ); -- 2.20.1