Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/66291
Change subject: Do not show empty parenthesis on log entry when no block flags ...................................................................... Do not show empty parenthesis on log entry when no block flags When nothing is stored in the database, the explode in LogPage::formatBlockFlags will explode a empty string to a array with a empty string as only value. Avoid this by checking first for a empty string. Bug: 47035 Change-Id: I879169599a2a24b35e26d4a23ab8202f267d8b00 --- M includes/logging/LogPage.php 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/91/66291/1 diff --git a/includes/logging/LogPage.php b/includes/logging/LogPage.php index 9d6ab25..fa2b8b2 100644 --- a/includes/logging/LogPage.php +++ b/includes/logging/LogPage.php @@ -518,7 +518,11 @@ * @return String */ public static function formatBlockFlags( $flags, $lang ) { - $flags = explode( ',', trim( $flags ) ); + $flags = trim( $flags ); + if ( $flags === '' ) { + return ''; //nothing to do + } + $flags = explode( ',', $flags ); if ( count( $flags ) > 0 ) { for ( $i = 0; $i < count( $flags ); $i++ ) { -- To view, visit https://gerrit.wikimedia.org/r/66291 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I879169599a2a24b35e26d4a23ab8202f267d8b00 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits