From: Matěj Suchánek Date: Fri, 26 May 2017 13:50:34 +0000 (+0200) Subject: Only try to show character difference if it isn't empty X-Git-Tag: 1.31.0-rc.0~613^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=8ac073311558aff07799c585c724ba5e31e2cd0b Only try to show character difference if it isn't empty When all grouped changes were categorization, the formatted character difference was an empty string. This resulted in doubled separator. In this case, we need to change it to false (like the code already did with log entries). Change-Id: Ic5cd82426985285809858ed67967bb2529bc31cb --- diff --git a/includes/changes/EnhancedChangesList.php b/includes/changes/EnhancedChangesList.php index b34a33fdcf..d8aeb77728 100644 --- a/includes/changes/EnhancedChangesList.php +++ b/includes/changes/EnhancedChangesList.php @@ -322,7 +322,7 @@ class EnhancedChangesList extends ChangesList { $first--; } # Get net change - $charDifference = $this->formatCharacterDifference( $block[$first], $block[$last] ); + $charDifference = $this->formatCharacterDifference( $block[$first], $block[$last] ) ?: false; } $numberofWatchingusers = $this->numberofWatchingusers( $block[0]->numberofWatchingusers );