Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] TypeError : PageIndexer::indexPage(): $userGroup must be of type ?int, string given #3986

Open
Apen opened this issue Mar 13, 2024 · 0 comments

Comments

@Apen
Copy link

Apen commented Mar 13, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant