8000 bug #14283 [2.7][Console] Count the $messages array instead of $messa… · symfony/symfony@6c72165 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6c72165

Browse files
committed
bug #14283 [2.7][Console] Count the $messages array instead of $message (barryvdh)
This PR was squashed before being merged into the 2.7 branch (closes #14283). Discussion ---------- [2.7][Console] Count the $messages array instead of $message | Q | A | ------------- | --- | Bug fix? | [yes] | New feature? | [no] | BC breaks? | [no] | Deprecations? | [no] | Tests pass? | [yes] | Fixed tickets | n/a | License | MIT I think you mean $messages instead of $message. With this patch, the number of messages is correctly counted. Commits ------- 95aa167 [2.7][Console] Count the array instead of
2 parents 1e121e6 + 95aa167 commit 6c72165

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Console/Style/SymfonyStyle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function block($messages, $type = null, $style = null, $prefix = ' ', $pa
7373
$message = OutputFormatter::escape($message);
7474
$lines = array_merge($lines, explode("\n", wordwrap($message, $this->lineLength - Helper::strlen($prefix))));
7575

76-
if (count($messages) > 1 && $key < count($message)) {
76+
if (count($messages) > 1 && $key < count($messages) - 1) {
7777
$lines[] = '';
7878
}
7979
}

0 commit comments

Comments
 (0)
0