Skip to content

Commit

Permalink
Fix TypeError
Browse files Browse the repository at this point in the history
Fix a TypeError happening with later php versions.

TypeError: PageQuery::validatePages(): Argument #1 ($pages) must be of type array, bool given, called in /lib/plugins/pagequery/syntax.php on line 271
  • Loading branch information
SneakBug8 authored and mprins committed Feb 14, 2024
1 parent dcca008 commit f985d83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion syntax.php
Expand Up @@ -268,13 +268,13 @@ public function render($format, Doku_Renderer $renderer, $data): bool
// search by page name or path only
$results = $pq->pageLookup($query, $data['fullregex'], $incl_ns, $excl_ns);
}
$results = $pq->validatePages($results, $data['hidestart'], $data['maxns']);
$no_result = false;
$sort_array = [];
if ($results == false) {
$no_result = true;
$message = $this->getLang('regex_error');
} elseif (!empty($results)) {
$results = $pq->validatePages($results, $data['hidestart'], $data['maxns']);
// prepare the necessary sorting arrays, as per users options
[$sort_array, $sort_opts, $group_opts] = $pq->buildSortingArray($results, $data);

Expand Down

0 comments on commit f985d83

Please sign in to comment.