check plugin instance before retrieving version

This commit is contained in:
Pig Fang 2019-02-16 16:56:53 +08:00
parent 3d2a4b3df9
commit 8255765ce4

View File

@ -2,6 +2,7 @@
namespace App\Services;
use Log;
use Storage;
use App\Events;
use Composer\Semver\Semver;
@ -440,7 +441,9 @@ class PluginManager
];
} else {
$plugin = $this->getPlugin($item['name']);
$item['version'] = $plugin->getVersion();
if (!empty($plugin)) {
$item['version'] = $plugin->getVersion();
}
return $item;
}
});