Skip to content

php8 - catch block without var - internal error triggered #4385 #57

@mitalcoi

Description

@mitalcoi

Code example:

try {
} catch (NumberReleaseFailedException){ //missed $error var - php 8 allow it
}

Error:

Internal error: PhpParser\NodeVisitorAbstract@anonymous(): Argument #1 ($catchedVariableName) must be of type string, null given, called in
vendor/thecodingmachine/phpstan-strict-rules/src/Rules/Exceptions/ThrowMustBundlePreviousExceptionRule.php on line 34

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