Bug #94543 ยป local_history1.patch
web/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php (date 1626090979318) | ||
---|---|---|
// Hooks may have parse the data structure already to an array. If that is not the case, parse it now.
|
||
if (is_string($dataStructure)) {
|
||
// Resolve FILE: prefix pointing to a DS in a file
|
||
if (strpos(trim($dataStructure), 'FILE:') === 0) {
|
||
$file = GeneralUtility::getFileAbsFileName(substr(trim($dataStructure), 5));
|
||
if (empty($file) || !@is_file($file)) {
|
||
throw new \RuntimeException(
|
||
'Data structure file ' . $file . ' could not be resolved to an existing file',
|
||
1478105826
|
||
);
|
||
}
|
||
$dataStructure = (string)file_get_contents($file);
|
||
foreach(['EXT:'=>0, 'FILE:'=>5] as $check => $length ) {
|
||
if (strpos(trim($dataStructure), $check) === 0) {
|
||
$file = GeneralUtility::getFileAbsFileName(substr(trim($dataStructure), $length));
|
||
if (empty($file) || !@is_file($file)) {
|
||
throw new \RuntimeException(
|
||
'Data structure file ' . $file . ' could not be resolved to an existing file',
|
||
1478105826
|
||
);
|
||
}
|
||
$dataStructure = (string)file_get_contents($file);
|
||
}
|
||
}
|
||
// Parse main structure
|