@@ -84,13 +84,11 @@ public static function download($name, $extend = [])
8484 $ body = $ response ->getBody ();
8585 $ content = $ body ->getContents ();
8686 } else {
87- Log::write ("[addon] " . $ content );
8887 //下载返回错误,抛出异常
8988 throw new AddonException ($ json ['msg ' ], $ json ['code ' ], $ json ['data ' ]);
9089 }
9190 }
9291 } catch (TransferException $ e ) {
93- Log::write ("[addon] " . $ e ->getMessage ());
9492 throw new Exception (config ('app_debug ' ) ? $ e ->getMessage () : "Addon package download failed " );
9593 }
9694
@@ -387,7 +385,7 @@ public static function refresh()
387385 $ bootstrapArr = [];
388386 foreach ($ addons as $ name => $ addon ) {
389387 $ bootstrapFile = self ::getBootstrapFile ($ name );
390- if ($ addon ['state ' ] && is_file ($ bootstrapFile ) && self :: isAuthorization ( $ name ) ) {
388+ if ($ addon ['state ' ] && is_file ($ bootstrapFile )) {
391389 $ bootstrapArr [] = file_get_contents ($ bootstrapFile );
392390 }
393391 }
@@ -1123,10 +1121,8 @@ public static function sendRequest($url, $params = [], $method = 'POST')
11231121 $ content = $ body ->getContents ();
11241122 $ json = (array )json_decode ($ content , true );
11251123 } catch (TransferException $ e ) {
1126- Log::write ("[addon] " . $ e ->getMessage ());
11271124 throw new Exception (config ('app_debug ' ) ? $ e ->getMessage () : __ ('Network error ' ));
11281125 } catch (\Exception $ e ) {
1129- Log::write ("[addon] " . $ e ->getMessage ());
11301126 throw new Exception (config ('app_debug ' ) ? $ e ->getMessage () : __ ('Unknown data format ' ));
11311127 }
11321128 return $ json ;
0 commit comments