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

Warning: Undefined global variable $version #43

Open
jasperpoppe opened this issue Oct 9, 2024 · 0 comments
Open

Warning: Undefined global variable $version #43

jasperpoppe opened this issue Oct 9, 2024 · 0 comments

Comments

@jasperpoppe
Copy link

As of PHP 8.1.0, write access to the entire $GLOBALS array is no longer supported:
https://www.php.net/manual/en/reserved.variables.globals.php

Even if $GLOBALS['version'] = 'version_number'; is set in the Configuration class, we catched this ErrorException: Warning: Undefined global variable $version.
https://github.com/getbrevo/brevo-php/blob/main/lib/Configuration.php#L41

Because this variable is called in the constructor, we got this warning constantly.
Is it possible to get rid of the $GLOBALS['version'] variable?

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