mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-01 10:56:08 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user