[BUGFIX] Properly handle diff while updating meta data
The existing solution using `array_diff` did not work, as it only respects values, not a combination with keys. Given an existing record with some empty values would prevent unsetting another value with an empty. The same would apply for setting another value to an existing value. That's why we change to `array_diff_assoc`, which handles proper diff of value in combination with key. Resolves: #103708 Releases: main, 12.4 Change-Id: I36adbc8279e5160c33e8feffcd8741c30c667adc Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84000 Tested-by:Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
Showing
- typo3/sysext/core/Classes/Resource/Index/MetaDataRepository.php 1 addition, 1 deletion...sysext/core/Classes/Resource/Index/MetaDataRepository.php
- typo3/sysext/core/Tests/Functional/Resource/Index/Fixtures/FileWithMetaData.csv 6 additions, 0 deletions...s/Functional/Resource/Index/Fixtures/FileWithMetaData.csv
- typo3/sysext/core/Tests/Functional/Resource/Index/MetaDataRepositoryTest.php 49 additions, 0 deletions...ests/Functional/Resource/Index/MetaDataRepositoryTest.php
Please register or sign in to comment