Skip to content

Reports ArtihmeticError for division, remainder and bitwise operations #77

Closed
@marcospassos

Description

@marcospassos

The following snippet reports a false positive:

try {
    return $x / $y;
} catch (ArithmeticError $exception) {
}
ArithmeticError is never thrown in the corresponding try block  

According to the PHP's docs, division, remainder and bitwise operations can throw ArithmeticException.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions