From f37a6d97b5f37d03fe780cf1bdc5c6fdd320b300 Mon Sep 17 00:00:00 2001 From: Justin Du Date: Fri, 27 Jan 2017 09:31:47 -0600 Subject: [PATCH] Fix tags not being set in Special:Block Currently, a PHP error is thrown when tags are not set in Special:Block on line 832. This patch fixes this by adding an extra isset() check to see if the tags variable is set. Bug: T156486 Change-Id: Ib8722bffbcac5953263ded41eceb3d389d0932f0 --- includes/specials/SpecialBlock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index 93cb3773bd..c18ae0e336 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -829,7 +829,7 @@ class SpecialBlock extends FormSpecialPage { $logEntry->setRelations( [ 'ipb_id' => $blockIds ] ); $logId = $logEntry->insert(); - if ( count( $data['Tags'] ) ) { + if ( !empty( $data['Tags'] ) ) { $logEntry->setTags( $data['Tags'] ); } -- 2.20.1