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

Undefined array key "purposeOrder" #50

Open
gtitze opened this issue Nov 7, 2024 · 1 comment
Open

Undefined array key "purposeOrder" #50

gtitze opened this issue Nov 7, 2024 · 1 comment

Comments

@gtitze
Copy link

gtitze commented Nov 7, 2024

Version of we_cookie_consent: 4.1.0
Typo3 Version: 12.4.22

if($klaroConfig['purposeOrder']) {

If no categories are assigned (or no services could be loaded), array key purposeOrder does not exist in $klaroConfig. Therefore, a PHP Warning: Undefined array key "purposeOrder" is raised on this line.

To resolve this issue, array_key_exists() or isset() should be used in order to prevent the error.

@marcelmarty
Copy link

marcelmarty commented Dec 18, 2024

Can confirm that issue...

we_cookie_consent: 4.1.1
TYPO3: 12.4.24

Possible solution:

if($klaroConfig['purposeOrder']) {

if ($klaroConfig['purposeOrder'] ?? false) {

}

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

2 participants