do not treat empty extension list as a error

This commit is contained in:
Uwe Steinmann 2020-05-14 11:41:03 +02:00
parent 164efbeb49
commit 94725ac0a4

View File

@ -578,7 +578,7 @@ class SeedDMS_Extension_Mgr {
public function updateExtensionList($version='', $force=false) { /* {{{ */
if($this->reposurl) {
if(!file_exists($this->cachedir."/".self::repos_list_file) || $force) {
if($file = @file_get_contents($this->reposurl.($version ? '?seeddms_version='.$version : ''), false, $this->getStreamContext())) {
if(false !== ($file = @file_get_contents($this->reposurl.($version ? '?seeddms_version='.$version : ''), false, $this->getStreamContext()))) {
if(is_array($http_response_header)) {
$parts=explode(' ',$http_response_header[0]);
if(count($parts)>1) //HTTP/1.0 <code> <text>
@ -587,6 +587,10 @@ class SeedDMS_Extension_Mgr {
return false;
}
}
if(!$file) {
$this->errmsgs[] = 'Extension list is empty';
return false;
}
file_put_contents($this->cachedir."/".self::repos_list_file, $file);
} else {
return false;