mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 15:33:23 +01:00
throw if we don't get the upload_url
This commit is contained in:
parent
938aaa531a
commit
1e45b8dd9a
@ -455,7 +455,12 @@ function do_upload()
|
||||
|
||||
if (empty($config['upload_url']))
|
||||
{
|
||||
$response = github_api("/repos/EGroupware/egroupware/releases", array(), 'GET');
|
||||
$response = github_api("/repos/EGroupware/egroupware/releases", [], 'GET');
|
||||
if (empty($response[0]['upload_url']))
|
||||
{
|
||||
throw new Exception("github_api('/repos/EGroupware/egroupware/releases', [], 'GET') responded with ".
|
||||
json_encode($response, JSON_UNESCAPED_SLASHES));
|
||||
}
|
||||
$config['upload_url'] = preg_replace('/{\?[^}]+}$/', '', $response[0]['upload_url']); // remove {?name,label} template
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user