mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-11-27 18:10:42 +00:00
check if downloading a file from the repository succeeded
This commit is contained in:
parent
3efcf064f2
commit
a8c3650725
|
|
@ -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;
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user