Bug #86597

Incorrect query of the fallback uids in the core

Added by Kay Röseler 10 days ago. Updated 9 days ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2018-10-08
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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']);
}

History

#1 Updated by Josef Glatz 9 days ago

  • Description updated (diff)

#2 Updated by Josef Glatz 9 days ago

  • Description updated (diff)

#3 Updated by Georg Ringer 9 days ago

  • Category changed from Localization to Link Handling, Site Handling & Routing

Also available in: Atom PDF