Return plugin name as-is if plugin is unavailable (fix #32)

This commit is contained in:
Pig Fang 2019-04-03 22:43:14 +08:00
parent ac4fb12e42
commit b23538c47e

View File

@ -438,6 +438,11 @@ class PluginManager
if (is_string($item)) {
$plugin = $this->getPlugin($item);
// If we cannot read the package of that plugin, just return it as-is.
if (is_null($plugin)) {
return $item;
}
return [
'name' => $item,
'version' => $plugin->getVersion(),