1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 08:17:12 +02:00

Fix inadvertent debug mode memory leak issue when using $pages->findMany(), plus optimize PageTable for faster load when sortfield(s) are in use. Per @apeisa / Avoine.

This commit is contained in:
Ryan Cramer
2016-12-19 06:57:37 -05:00
parent 3f758312a6
commit aab97a0b00
2 changed files with 11 additions and 18 deletions

View File

@@ -121,10 +121,11 @@ class PageArrayIterator extends Wire implements \Iterator {
$ids[] = $page->id;
}
$debug = $this->wire('pages');
if($debug) $this->wire('pages')->debug(false);
$this->pages = $this->wire('pages')->getById($ids, $options);
if($debug) $this->wire('pages')->debug(true);
$pages = $this->wire('pages');
$debug = $pages->debug();
if($debug) $pages->debug(false);
$this->pages = $pages->getById($ids, $options);
if($debug) $pages->debug(true);
}
$this->pagesCount = count($this->pages);