Browse Source

Use curl to fetch extensions list (#6767)

fix https://github.com/FreshRSS/FreshRSS/issues/6744
Alexandre Alapetite 1 year ago
parent
commit
4f29b715ef
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Controllers/extensionController.php

+ 2 - 2
app/Controllers/extensionController.php

@@ -44,10 +44,10 @@ class FreshRSS_extension_Controller extends FreshRSS_ActionController {
 	 */
 	 */
 	protected function getAvailableExtensionList(): array {
 	protected function getAvailableExtensionList(): array {
 		$extensionListUrl = 'https://raw.githubusercontent.com/FreshRSS/Extensions/master/extensions.json';
 		$extensionListUrl = 'https://raw.githubusercontent.com/FreshRSS/Extensions/master/extensions.json';
-		$json = @file_get_contents($extensionListUrl);
+		$json = httpGet($extensionListUrl, CACHE_PATH . '/extension_list.json', 'json');
 
 
 		// we ran into problems, simply ignore them
 		// we ran into problems, simply ignore them
-		if ($json === false) {
+		if ($json === '') {
 			Minz_Log::error('Could not fetch available extension from GitHub');
 			Minz_Log::error('Could not fetch available extension from GitHub');
 			return [];
 			return [];
 		}
 		}