diff --git a/inc/inc.ClassExtensionMgr.php b/inc/inc.ClassExtensionMgr.php index 9d1485e65..6a4b56ac7 100644 --- a/inc/inc.ClassExtensionMgr.php +++ b/inc/inc.ClassExtensionMgr.php @@ -465,16 +465,19 @@ class SeedDMS_Extension_Mgr { public function updateExtensionList($version='', $force=false) { /* {{{ */ if($this->reposurl) { if(!file_exists($this->cachedir."/".self::repos_list_file) || $force) { - $file = @file_get_contents($this->reposurl.($version ? '?seeddms_version='.$version : '')); - if(is_array($http_response_header)) { - $parts=explode(' ',$http_response_header[0]); - if(count($parts)>1) //HTTP/1.0 - if(intval($parts[1]) != 200) { - $this->errmsgs[] = 'Getting extension list returned http code ('.$parts[1].')'; - return false; - } + if($file = @file_get_contents($this->reposurl.($version ? '?seeddms_version='.$version : ''))) { + if(is_array($http_response_header)) { + $parts=explode(' ',$http_response_header[0]); + if(count($parts)>1) //HTTP/1.0 + if(intval($parts[1]) != 200) { + $this->errmsgs[] = 'Getting extension list returned http code ('.$parts[1].')'; + return false; + } + } + file_put_contents($this->cachedir."/".self::repos_list_file, $file); + } else { + return false; } - file_put_contents($this->cachedir."/".self::repos_list_file, $file); } return true; } else {