Skip to content

Error handling in API Client.php doesn't cover curl failures #38

@nevinsm

Description

@nevinsm

Model/Payment/Api/Client.php line 277 includes references to $status, and $result which are defined only in the try block. This causes an error within the catch block if garbage data is thrown at the curl call by using invalid characters in the username or password. The catch block does not cover an error with the curl call itself, thereby preventing the bubbling of the root cause of a failure because PHP errors on the undefined variables before the original exception is passed on again at line 285.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions