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

array_key_exists exception on 1.7-rc10 with Gantry latest #74

Closed
thekenshow opened this issue May 6, 2020 · 5 comments
Closed

array_key_exists exception on 1.7-rc10 with Gantry latest #74

thekenshow opened this issue May 6, 2020 · 5 comments
Labels

Comments

@thekenshow
Copy link

Installed Sitemap plugin, enabled, browsed to '/sitemap', got the array_key_exists(): The first argument should be either a string or an integer error on line 78 of sitemap.php:

$lang_available = (empty($page_languages) || array_key_exists($current_lang, $page_languages));
@mahagr
Copy link
Member

mahagr commented May 8, 2020

FYI: Not related to Grav 1.7 but PHP 7.4.

@thekenshow
Copy link
Author

This is happening on PHP 7.2.24.

@mahagr mahagr added the bug label May 18, 2020
@mahagr
Copy link
Member

mahagr commented May 23, 2020

Thanks.

@mahagr
Copy link
Member

mahagr commented Jul 1, 2020

It looks like $language->getLanguage() and $language->getDefault() can both return null.

CC @rhukster

@mahagr
Copy link
Member

mahagr commented Jul 1, 2020

@thekenshow Workaround is to set (default) language in system.yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants