Skip to content

Commit

Permalink
[TASK] Force integer for specific fields of site configuration
Browse files Browse the repository at this point in the history
If the site config is saved through the site module the following fields
are saved as integer instead of a string:

- `languageId` of a language item
- `errorCode of an errorHandling item

This change makes it easier to lint the yaml configuration.

Resolves: #92510
Releases: master, 10.4
Change-Id: I3086a6c71a191ac1cbc0c14deadce3fa7fab5f5d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66046
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
georgringer authored and bmack committed Oct 8, 2020
1 parent 210cdc0 commit d7ba051
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -506,6 +506,7 @@ protected function validateFullStructure(array $newSysSiteData): array
}
if (!in_array((int)$child['errorCode'], $uniqueCriteria, true)) {
$uniqueCriteria[] = (int)$child['errorCode'];
$child['errorCode'] = (int)$child['errorCode'];
$validChildren[] = $child;
} else {
$message = sprintf(
Expand Down Expand Up @@ -537,6 +538,7 @@ protected function validateFullStructure(array $newSysSiteData): array
}
if (!in_array((int)$child['languageId'], $uniqueCriteria, true)) {
$uniqueCriteria[] = (int)$child['languageId'];
$child['languageId'] = (int)$child['languageId'];
$validChildren[] = $child;
} else {
$message = sprintf(
Expand Down

0 comments on commit d7ba051

Please sign in to comment.