Skip to content

[Console] Multiple line breaks "\n\n" are ignored on exception message. #24212

@yceruto

Description

@yceruto
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 2.7 (tested in 3.4)

newline-bug

The raw message clearly shows two line breaks between sentences, however the final message ignore it. No matter how many line breaks you put, only one is taken into account.

This should be the expected result based on the raw message:
newlines-bug-ok

The related code is too old (a52f41d, 4a4fea7):

if ('' !== $line) {
$lines[] = count($lines) ? str_pad($line, $width) : $line;
}

So I'm not sure (implications? real cause?) if removing the if statement (https://3v4l.org/XcI6Q) is the right solution even though it worked for me. Someone could validate this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions