Normalize category storage PID on TYPO3v12
The new TypoScript parser introduced in TYPO3v12 yields a regular integer in case of a single storagePid. Only in case of a CSV this will be a string. This in turn leads to explode() failing with a type error in the integer case.
Fix this by normalizing the setting value to string.
Fixes: #301
This patch solves the issue for the CategoryRepository, however we have the same issue in the PostRepository
Thanks, I've refreshed the PR, included your change and also did the same for the TagRepository.
@mbrodala your solution would still fail if the setting contained a non-scalar value like an array. It would be safer to test if it is set to a scalar value as I did in my patch, first.
That is something left to do in case TYPO3 ever supports this. Right now it can only be a string, the implicit conversion to a number could be considered a unintended side-effect.
Do you have an example where storagePid could be an array?