-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
YAML DUMP_MULTI_LINE_LITERAL_BLOCK question, possible bug #20706
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
Comments
@lauradean Thank you for reporting this issue. Can you please also show us the code you used to dump as well as the array to be dumped? |
Here is the line of code to create the Yaml:
The real array is too long and contains sensitive information and html that will not display properly, but here is something similar, as would be output by print_r:
Here is the desired YAML output, which worked after I put in the above code change:
(I did not test this specific array.) |
I think you are right. See #20732 which will resolve your issue. |
This PR was merged into the 3.1 branch. Discussion ---------- fix the inline level for dumped multi-line strings | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20706 | License | MIT | Doc PR | Commits ------- 5269796 fix the inline level for dumped multi-line strings
Uh oh!
There was an error while loading. Please reload this page.
In outputting an array to YAML, my multi-line strings were not being output as literals, but I found that if I changed the line in Dumper.php from
to
then it works perfectly.
Is there a reason for checking for
$inline > 1
?The text was updated successfully, but these errors were encountered: