From: Justin Du Date: Fri, 27 Jan 2017 15:31:47 +0000 (-0600) Subject: Fix tags not being set in Special:Block X-Git-Tag: 1.31.0-rc.0~4202^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=f37a6d97b5f37d03fe780cf1bdc5c6fdd320b300;p=lhc%2Fweb%2Fwiklou.git 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 --- 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'] ); }