Bug #86597

Updated by Josef Glatz 10 months ago

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@ sysext/core/Classes/Site/Entity/SiteLanguage.php in line 153-155 no longer works because the query

<pre><code class="php">
if (!empty($attributes['fallbacks']))
</code></pre>




fails because the array Attributes Attrributes contains

@fallbacks fallbacks => '0'@. '0'.

Instead, it should be checked for @isset@ isset here.

*Incorrect:* Incorrect:

<pre><code class="php">
if (!empty($attributes['fallbacks'])) {
$this->fallbackLanguageIds = is_array($attributes['fallbacks']) ? $attributes['fallbacks'] : explode(',', $attributes['fallbacks']);
}
</code></pre>

*Correct:* Correct:

<pre><code class="php">
if (isset($attributes['fallbacks'])) {
$this->fallbackLanguageIds = is_array($attributes['fallbacks']) ? $attributes['fallbacks'] : explode(',', $attributes['fallbacks']);
}
</code></pre>

Back