mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-05 04:46:03 +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:
@@ -500,6 +500,10 @@ class Admin
|
|||||||
|
|
||||||
$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);
|
||||||
if ($page && $page->routable()) {
|
if ($page && $page->routable()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user