8000 Fixes #40633: Progress bar breaks when progress bar character is unic… · grasmash/symfony@38343f4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 38343f4

Browse files
authored
Fixes symfony#40633: Progress bar breaks when progress bar character is unicode.
1 parent 54209bb commit 38343f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Console/Helper/ProgressBar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ private static function initPlaceholderFormatters(): array
514514
$display = str_repeat($bar->getBarCharacter(), $completeBars);
515515
if ($completeBars < $bar->getBarWidth()) {
516516
$emptyBars = $bar->getBarWidth() - $completeBars - Helper::strlenWithoutDecoration($output->getFormatter(), $bar-> 5672 getProgressCharacter());
517-
$display .= $bar->getProgressCharacter().str_repeat($bar->getEmptyBarCharacter(), $emptyBars);
517+
$display .= $bar->getProgressCharacter().str_repeat($bar->getEmptyBarCharacter(), max($emptyBars,0));
518518
}
519519

520520
return $display;

0 commit comments

Comments
 (0)
0