8000 [Console] SymfonyStyle : fix blocks failed when $messages is null by ogizanagi · Pull Request #14654 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console] SymfonyStyle : fix blocks failed when $messages is null #14654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Console] SymfonyStyle : fix blocks failed when $messages is null.
Using the `SymfonyStyle:block` method with `null` as first argument
failed, where most of other methods accepting both string and array arguments will simply output an empty string.
  • Loading branch information
ogizanagi authored and maxime.steinhausser committed May 21, 2015
commit cfd10228782f5c438dbd28b591bdfe9b2e27f8a0
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Style/SymfonyStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __construct(InputInterface $input, OutputInterface $output)
*/
public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false)
{
$messages = array_values((array) $messages);
$messages = is_array($messages) ? array_values($messages) : array($messages);
$lines = array();

// add type
Expand Down
0