Skip to content

ini_get() analysis should be aware of whether an option exists or not #3063

@dktapps

Description

@dktapps

Feature request

ini_get() returns false only when the directive specified does not exist.

substr() will never receive false in this code because the date.timezone ini directive always exists.
https://phpstan.org/r/6cdcdcb9-aa0c-4848-b727-4b2cf8e225e7

The above code should not report any errors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions