Skip to content

[PHP 7.4] Parameter #2 $allowable_tags of function strip_tags expects string, array<int, string> given. #3125

@ruudk

Description

@ruudk

Bug report

strip_tags('Hello', ['a']);

// Parameter #2 $allowable_tags of function strip_tags expects string, array<int, string> given. 

See https://phpstan.org/r/3c6894fd-da88-49ab-9c27-06f60880c618

Since PHP 7.4.0 the allowable_tags (parameter 2) accepts an array but PHPStan doesn't understand it.

https://www.php.net/strip_tags

Expected output

No error

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