Skip to content

Deprecation notice on PHP 8.1 #656

@morozov

Description

@morozov

Constraint#incrementPath() calls strlen() on NULL which leads to a notice:

$ php --version
PHP 8.1.0-dev (cli) (built: Feb 20 2021 21:48:33) ( NTS )

$ composer --version
Deprecation Notice: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:48
Composer version 2.0.999-dev+source @release_date@

Execution flow:

  1. https://github.com/justinrainbow/json-schema/blob/f4f0c3457811006f861c466a10c6c24f3e92f9ae/src/JsonSchema/Constraints/UndefinedConstraint.php#L34-L40
  2. https://github.com/justinrainbow/json-schema/blob/f4f0c3457811006f861c466a10c6c24f3e92f9ae/src/JsonSchema/Constraints/Constraint.php#L43-L49

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