Merge pull request #301 from JorisDebonnet/patch-1

Bugfix: avoid calling "new PaginatedList(null)"
This commit is contained in:
Michael Strong 2015-10-27 13:26:16 +13:00
commit dde32209f8

View File

@ -962,7 +962,7 @@ class Blog_Controller extends Page_Controller {
*/
$dataRecord = $this->dataRecord;
$posts = new PaginatedList($this->blogPosts);
$posts = new PaginatedList($this->getBlogPosts());
if($this->PostsPerPage > 0) {
$posts->setPageLength($this->PostsPerPage);