File tree 1 file changed +4
-9
lines changed
Filter options
src/Symfony/Component/Yaml
1 file changed +4
-9
lines changed
Original file line number Diff line number Diff line change @@ -422,20 +422,15 @@ private function doParse($value, $flags)
422
422
423
423
// try to parse the value as a multi-line string as a last resort
424
424
if (0 === $ this ->currentLineNb && 1 < $ this ->totalNumberOfLines ) {
425
- // If the indentation is not consistent at offset 0, it is to be considered as a ParseError
426
- if (0 === $ this ->offset && !$ deprecatedUsage ) {
427
- foreach ($ this ->lines as $ line ) {
428
- if (rtrim ($ line ) !== trim ($ line )) {
429
- throw new ParseException ('Unable to parse. ' , $ this ->getRealCurrentLineNb () + 1 , $ this ->currentLine , $ this ->filename );
430
- }
431
- }
432
- }
433
-
434
425
$ previousLineWasNewline = false ;
435
426
$ previousLineWasTerminatedWithBackslash = false ;
436
427
$ value = '' ;
437
428
438
429
foreach ($ this ->lines as $ line ) {
430
+ // If the indentation is not consistent at offset 0, it is to be considered as a ParseError
431
+ if (0 === $ this ->offset && !$ deprecatedUsage && rtrim ($ line ) !== trim ($ line )) {
432
+ throw new ParseException ('Unable to parse. ' , $ this ->getRealCurrentLineNb () + 1 , $ this ->currentLine , $ this ->filename );
433
+ }
439
434
if ('' === trim ($ line )) {
440
435
$ value .= "\n" ;
441
436
} elseif (!$ previousLineWasNewline && !$ previousLineWasTerminatedWithBackslash ) {
You can’t perform that action at this time.
0 commit comments