Issue Bug Closed

#101243Fix in linkvalidator PagesRepository::doesRootLineContainHiddenPages

Sybille Peters 07/05/23, 12:25 updated 07/09/24, 14:15

Description

PagesRepository::doesRootlineContainHiddenPages() calls itself. It fetches fields from the DB without “pid” and passes the results to itself, then checks the value of pid, but this is always empty.

PagesRepository code:

42 public function doesRootLineContainHiddenPages(array $pageInfo): bool
43 {
44        $pid = (int)($pageInfo['pid'] ?? 0);

....

59 $row = $queryBuilder
60            ->select('uid', 'title', 'hidden', 'extendToSubpages')

....

72 return $this->doesRootLineContainHiddenPages($row);

Also, it is not necessary to get the title here

Reviews 2