ext-solr
ext-solr copied to clipboard
[BUG] TypeError : PageIndexer::indexPage(): $userGroup must be of type ?int, string given
Describe the bug A small type error when indexing restricted pages.
0: TypeError: ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer::indexPage(): Argument #3 ($userGroup) must be of type ?int, string given, called in vendor/apache-solr-for-typo3/solr/Classes/IndexQueue/PageIndexer.php on line 66 and defined in vendor/apache-solr-for-typo3/solr/Classes/IndexQueue/PageIndexer.php:288
To fix this, we just need to cast to int :
foreach ($systemLanguageUids as $systemLanguageUid) {
$contentAccessGroups = $this->getAccessGroupsFromContent($item, $systemLanguageUid);
foreach ($contentAccessGroups as $userGroup) {
$this->indexPage($item, $systemLanguageUid, (int)$userGroup);
}
}
Used versions (please complete the following information):
- TYPO3 Version: 12.4.11
- EXT:solr Version: 12.0.2
- PHP Version: 8.2
- MySQL Version: 8