mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-28 06:57:22 +08:00
try plugin listAllFromRemote error
This commit is contained in:
@@ -104,6 +104,7 @@ class PluginStore extends Model
|
|||||||
|
|
||||||
private static function listAllFromRemote()
|
private static function listAllFromRemote()
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
$response = Http::get(self::PLUGIN_LIST_API);
|
$response = Http::get(self::PLUGIN_LIST_API);
|
||||||
if ($response->getStatusCode() != 200) {
|
if ($response->getStatusCode() != 200) {
|
||||||
do_log(sprintf("status code: %d, body: %s", $response->getStatusCode(), $response->getBody()), 'error');
|
do_log(sprintf("status code: %d, body: %s", $response->getStatusCode(), $response->getBody()), 'error');
|
||||||
@@ -118,6 +119,10 @@ class PluginStore extends Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $list;
|
return $list;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
do_log(sprintf("listAllFromRemote from: %s error: %s", self::PLUGIN_LIST_API, $e->getMessage()), 'error');
|
||||||
|
return [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getHasNewVersionCount(): int
|
public static function getHasNewVersionCount(): int
|
||||||
|
|||||||
Reference in New Issue
Block a user