mirror of
https://github.com/processwire/processwire.git
synced 2025-08-16 11:44:42 +02:00
Fix issue processwire/processwire-issues#1041
This commit is contained in:
@@ -429,12 +429,16 @@ class PageTraversal {
|
||||
|
||||
} else {
|
||||
$row = reset($rows);
|
||||
$result = $pages->getById(array($row['id']), array(
|
||||
'template' => $page->wire('templates')->get($row['templates_id']),
|
||||
'parent_id' => $row['parent_id'],
|
||||
'getOne' => true,
|
||||
'cache' => $page->loaderCache
|
||||
));
|
||||
if($row && !empty($row['id'])) {
|
||||
$result = $pages->getById(array($row['id']), array(
|
||||
'template' => $page->wire('templates')->get($row['templates_id']),
|
||||
'parent_id' => $row['parent_id'],
|
||||
'getOne' => true,
|
||||
'cache' => $page->loaderCache
|
||||
));
|
||||
} else {
|
||||
$result = $pages->newNullPage();
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
Reference in New Issue
Block a user