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

PHP 8.1+ Support + Fix Errors When API/Internet Connection Down #54

Merged
merged 2 commits into from
Aug 31, 2023
Merged

PHP 8.1+ Support + Fix Errors When API/Internet Connection Down #54

merged 2 commits into from
Aug 31, 2023

Conversation

joelwmale
Copy link
Contributor

This PR adds support for PHP 8.1/8.2 and fixes an error with no internet connection or when the API is down.

When localFlags() returns null, payload on line 375 of Client.php is null. array_key_exists throws an exception when this is null, therefore breaking the entire website.

It seems it doesn't matter if payload is null regardless, so this PR fixes that error.

@joelwmale
Copy link
Contributor Author

Fixes PR #50

@joelwmale
Copy link
Contributor Author

@neilkakkar could I get this reviewed? Can't use this package on http://careerlane.com.au/ until this is merged and fixes the intermittent errors it gets.

@neilkakkar
Copy link
Contributor

Perfect, thank you!

@neilkakkar neilkakkar merged commit b2db4bf into PostHog:master Aug 31, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants