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

strict types error classes/sitemapxml: Cannot assign string to property zen_SiteMapXML::$default_language_id of type int classes\sitemapxml.php:139 #38

Closed
torvista opened this issue Feb 13, 2024 · 0 comments
Labels
bug Something isn't working fix provided A correction has been provided
Milestone

Comments

@torvista
Copy link

if using strict types, as I always do...

foreach ($lng->catalog_languages as $language) {
$this->languages[$language['id']] = [
'directory' => $language['directory'],
'id' => $language['id'],
'code' => $language['code'],
];
$languagesIDsArray[] = $language['id'];
if ($language['code'] === DEFAULT_LANGUAGE) {
$this->default_language_id = $language['id'];
}
}

as $default_language_id is defined as int.

Also noted that $lng->catalog_languages is marked as deprecated for ZC2+.

@lat9 lat9 added the bug Something isn't working label Mar 30, 2024
@lat9 lat9 added this to the v4.0.1 milestone Mar 30, 2024
@lat9 lat9 added the fix provided A correction has been provided label Mar 30, 2024
@lat9 lat9 closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix provided A correction has been provided
Projects
None yet
Development

No branches or pull requests

2 participants