check if downloading a file from the repository succeeded

This commit is contained in:
Uwe Steinmann 2025-11-15 11:27:38 +01:00
parent 3efcf064f2
commit a8c3650725

View File

@ -712,9 +712,13 @@ $EXT_CONF = '.var_export($EXT_CONF, true).';');
*/
public function getExtensionFromRepository($file) { /* {{{ */
$content = file_get_contents($this->reposurl."/".$file, false, $this->getStreamContext());
$tmpfile = tempnam(sys_get_temp_dir(), '');
file_put_contents($tmpfile, $content);
return $tmpfile;
if ($content) {
$tmpfile = tempnam(sys_get_temp_dir(), '');
file_put_contents($tmpfile, $content);
return $tmpfile;
} else {
return false;
}
} /* }}} */
/**