mirror of
https://github.com/beestat/app.git
synced 2025-07-09 03:04:07 -04:00
Fixed API-C - Undefined offset: 0
This was happening because I was calling die() in an API call...which preemptively killed the script. The API didn't set some variables and everything broke. Better not to die() anyways so that stuff actually gets logged.
This commit is contained in:
parent
3632c4b8bc
commit
5e1ee836b7
@ -28,7 +28,6 @@ class ecobee extends external_api {
|
||||
*/
|
||||
public function authorize() {
|
||||
header('Location: https://api.ecobee.com/authorize?response_type=code&client_id=' . $this->setting->get('ecobee_client_id') . '&redirect_uri=' . $this->setting->get('ecobee_redirect_uri') . '&scope=smartRead');
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,7 +27,6 @@ class patreon extends external_api {
|
||||
*/
|
||||
public function authorize() {
|
||||
header('Location: https://www.patreon.com/oauth2/authorize?response_type=code&client_id=' . $this->setting->get('patreon_client_id') . '&redirect_uri=' . $this->setting->get('patreon_redirect_uri') . '&scope=identity');
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -42,12 +41,10 @@ class patreon extends external_api {
|
||||
$this->api('user', 'sync_patreon_status');
|
||||
}
|
||||
|
||||
echo '<html><head><title></title></head><body><script type="text/javascript">window.close();</script></body>';
|
||||
echo '<html><head><title></title></head><body><script type="text/javascript">window.close();</script></body></html><!--';
|
||||
|
||||
// Need to commit the transaction so the stuff gets saved.
|
||||
$this->database->commit_transaction();
|
||||
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user