From be33876bc0b87c11c9057677df8db7a60620533c Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Sun, 13 Sep 2015 20:27:01 +0200 Subject: [PATCH] Fix issue in offline admin --- classes/admin.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/classes/admin.php b/classes/admin.php index 53a90053..c87901f0 100644 --- a/classes/admin.php +++ b/classes/admin.php @@ -414,6 +414,10 @@ class Admin { $gpm = $this->gpm(); + if (!$gpm) { + return; + } + return $local ? $gpm->getInstalledPlugins() : $gpm->getRepositoryPlugins()->filter(function ( $package, $slug @@ -431,6 +435,10 @@ class Admin { $gpm = $this->gpm(); + if (!$gpm) { + return; + } + return $local ? $gpm->getInstalledThemes() : $gpm->getRepositoryThemes()->filter(function ($package, $slug) use ( $gpm