try fix: empty array to json, heroku error.

pull/187/head
qkqpttgf 2021-01-15 17:43:00 +08:00 committed by GitHub
parent 399fb38fd4
commit 894121d0c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -255,9 +255,8 @@ function getHerokuConfig($function_name, $apikey)
function setHerokuConfig($env, $function_name, $apikey)
{
//sortConfig($env);
$data = json_encode($env);
return HerokuAPI('PATCH', 'https://api.heroku.com/apps/' . $function_name . '/config-vars', $data, $apikey);
if (substr($data, 0, 1)=='{') return HerokuAPI('PATCH', 'https://api.heroku.com/apps/' . $function_name . '/config-vars', $data, $apikey);
}
function updateHerokuapp($function_name, $apikey, $source)