mirror of
https://github.com/beestat/app.git
synced 2026-05-26 17:12:30 -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:
+1
-4
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user