#86597Incorrect query of the fallback uids in the core
Description
Hello core team,
if only the default language is selected during fallback in the site configuration, the query in the file sysext/core/Classes/Site/Entity/SiteLanguage.php in line 153-155 no longer works because the query
if (!empty($attributes['fallbacks']))
fails because the array Attributes contains
fallbacks => '0'.
Instead, it should be checked for isset here.
Incorrect:
if (!empty($attributes['fallbacks'])) {
$this->fallbackLanguageIds = is_array($attributes['fallbacks']) ? $attributes['fallbacks'] : explode(',', $attributes['fallbacks']);
}
Correct:
if (isset($attributes['fallbacks'])) {
$this->fallbackLanguageIds = is_array($attributes['fallbacks']) ? $attributes['fallbacks'] : explode(',', $attributes['fallbacks']);
}