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

Extraneous warning: Undefined variable: _SESSION #68

Open
CarlBohman opened this issue Dec 2, 2021 · 0 comments
Open

Extraneous warning: Undefined variable: _SESSION #68

CarlBohman opened this issue Dec 2, 2021 · 0 comments

Comments

@CarlBohman
Copy link

If logging is turned up a little in MODx, Lingua issues an extraneous warning:

[2021-12-02 12:45:25] (WARN @ /[path]/core/components/lingua/model/lingua/lingua.class.php : 711) PHP notice: Undefined variable: _SESSION

The affected line is:
$langSessionValue = $_SESSION['cultureKey'];

A simple fix is:
$langSessionValue = $_SESSION['cultureKey'] ?? null;

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