mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 03:16:11 +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'];
|
$pages = $this->grav['pages'];
|
||||||
|
|
||||||
$latest = array();
|
$latest = array();
|
||||||
|
|
||||||
|
if(is_null($pages->routes())){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($pages->routes() as $url => $path) {
|
foreach ($pages->routes() as $url => $path) {
|
||||||
$page = $pages->dispatch($url, true);
|
$page = $pages->dispatch($url, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user