Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
handrasl opened this issue Aug 8, 2024 · 0 comments
Open

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

handrasl opened this issue Aug 8, 2024 · 0 comments

Comments

@handrasl
Copy link

handrasl commented Aug 8, 2024

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)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant