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
This commit is contained in:
Fabien Potencier 2015-04-10 17:31:32 +02:00
commit 6c721658e7

View File

@ -73,7 +73,7 @@ class SymfonyStyle extends OutputStyle
$message = OutputFormatter::escape($message);
$lines = array_merge($lines, explode("\n", wordwrap($message, $this->lineLength - Helper::strlen($prefix))));
if (count($messages) > 1 && $key < count($message)) {
if (count($messages) > 1 && $key < count($messages) - 1) {
$lines[] = '';
}
}