Skip to content

Deprecation in YAML parser #54704

@prudloff-insite

Description

@prudloff-insite

Symfony version(s) affected

6.4.3

Description

We noticed that the YAML parser triggers a deprecation with some malformed strings:

   DEPRECATED  substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /var/www/vendor/symfony/yaml/Parser.php on line 641.

How to reproduce

  $yaml = new \Symfony\Component\Yaml\Parser();
  $yaml->parse(',:
-

');

Possible Solution

No response

Additional Context

We noticed this while testing our YAML parsing logic with php-fuzzer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions