Skip to content

Error when I use Version 2.0 in CLI because of HTTP_USER_AGENT #41

@handrasl

Description

@handrasl

I would like to check the transactions' statuses that are in progress in a CLI command.
BarionClient throws an error because of there is no HTTP_USER_AGENT key under $_SERVER variable when I use CLI.

kép

$userAgent = $_SERVER['HTTP_USER_AGENT'];
if ($userAgent == "") {

I think it would be better that way.

$userAgent = $_SERVER['HTTP_USER_AGENT']  ?? null;
if (empty($userAgent)) {

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