-
Notifications
You must be signed in to change notification settings - Fork 13
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
PHP warning about missing langcode
property on $link['language']
#136
Comments
This looks wrong and probably is. (And all functional tests fail, BTW.) The global language object has no "language" property - it is langcode. So the question is, which other code calls this function like that, so the "language" property exists instead of the "langcode" property. |
… language object.
That's a good question, and the answer is I have no idea. This error pops up on cron. If you look in the database query above, these are the fields being retrieved:
Here it's definitely But I've switched to using $langcode = LANGUAGE_NONE;
if (isset($link['language']) && property_exists($link['language'], 'langcode')) {
$langcode = $link['language']->langcode;
}
$link['loc'] = xmlsitemap_get_path_alias($link['loc'], $langcode); I'll throw in some debug code in an |
langcode
property, object may still use language
in this module.langcode
property on $link['language']
I don't still have a copy of the error message, but the below fixes it for me:
change
to
The text was updated successfully, but these errors were encountered: