Skip to content
Snippets Groups Projects
Commit 55ad691a authored by Georg Ringer's avatar Georg Ringer Committed by Susanne Moog
Browse files

[BUGFIX] Skip invalid type field in LinkAnalyzer

Only add the type field to the search fields if it is found in the TCA
columns configuration to avoid failed queries. The table
'sys_file_reference' uses as type 'uid_local:type' which is not a valid
field and would break the query.

Resolves: #90760
Releases: master
Change-Id: I2ff0d43679176099bb304265a6afc456b92b56b7
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63727


Tested-by: default avatarRiccardo De Contardi <erredeco@gmail.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarSusanne Moog <look@susi.dev>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarSusanne Moog <look@susi.dev>
parent a025305b
Branches
Tags
No related merge requests found
......@@ -162,7 +162,9 @@ class LinkAnalyzer
$selectFields[] = $GLOBALS['TCA'][$table]['ctrl']['languageField'];
}
if ($GLOBALS['TCA'][$table]['ctrl']['type'] ?? false) {
$selectFields[] = $GLOBALS['TCA'][$table]['ctrl']['type'];
if (isset($GLOBALS['TCA'][$table]['columns'][$GLOBALS['TCA'][$table]['ctrl']['type']])) {
$selectFields[] = $GLOBALS['TCA'][$table]['ctrl']['type'];
}
}
$result = $queryBuilder->select(...$selectFields)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment