Skip to content
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

Can't avoid words wrapping in YAML dumps #1

Open
yblake opened this issue Apr 3, 2024 · 0 comments
Open

Can't avoid words wrapping in YAML dumps #1

yblake opened this issue Apr 3, 2024 · 0 comments

Comments

@yblake
Copy link

yblake commented Apr 3, 2024

The $wordwrap parameter of dump function is documented : "Pass in 0 for no wordwrap, false for default(40)"

When you give this parameter a value of 0, you should expect no word wrap.

But the dumper use default value of 40.

The mistake is at line 239. The condition empty($wordwrap) returns true for $wordwrap value 0,; which lead to apply the default settings of 40.

The fix is to replace this first part of the condition by !isset($wordwrap); this will allow $this->_dumpWordWrap to be 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant