Skip to content

openssl_error_string() wrongly typed as false #7106

@pbourdet

Description

@pbourdet

Bug report

When checking if openssl_error_string() === false at some point in a function, the return type of openssl_error_string() is always considered false even if we call other openssl functions.

Code snippet that reproduces the problem

https://phpstan.org/r/7c7a055c-268d-47f6-aa9f-b6d113cba563

Expected output

In this above snippet, the openssl_error_string() call in the if does not return false but "error:0909006C:PEM routines:get_name:no start line" and PHPStan should not raise an error.

Did PHPStan help you today? Did it make you happy in any way?

Yes I love it, thanks for this GREAT software ❤️

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions