Skip to content

Nullable $replacement for ::pcre() fails #241

@dakur

Description

@dakur

Version: 3.1.4
PHP 8.0.0

Bug Description

Calling Strings::pcre('preg_replace', ['#\\.#', NULL, '70', -1]) fails with Fatal error: Uncaught TypeError: preg_replace(): Argument #2 ($replacement) must be of type array|string, null given

It happens when using symplify/easy-coding-standard, but it looks rather like error with PHP 8.0 compatibility in nette/utils.

image

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