Add logic to check if pages even exist.

There was a problem with the dashboard page when checking for latest pages if there were no pages in the user/pages folder.
This commit is contained in:
Tyler Cosgrove
2015-11-29 09:49:51 -05:00
parent 045e1614fe
commit f0a51f1e35

View File

@@ -499,6 +499,10 @@ class Admin
$pages = $this->grav['pages'];
$latest = array();
if(is_null($pages->routes())){
return;
}
foreach ($pages->routes() as $url => $path) {
$page = $pages->dispatch($url, true);