Skip to content

Can't avoid words wrapping in YAML dumps #1

@yblake

Description

@yblake

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions