[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.
This commit is contained in:
parent
0542a17b5b
commit
cfd1022878
@ -60,7 +60,7 @@ class SymfonyStyle extends OutputStyle
|
||||
*/
|
||||
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
|
||||
|
Reference in New Issue
Block a user