mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-58489 core: Fix unreachable HTTP error handling
This commit is contained in:
parent
bd99cb9021
commit
eb4ab7c4b8
@ -188,7 +188,7 @@ class client extends \oauth2_client {
|
||||
$response = $this->post($this->token_url(), $this->build_post_data($params));
|
||||
}
|
||||
|
||||
if (!$this->info['http_code'] === 200) {
|
||||
if ($this->info['http_code'] !== 200) {
|
||||
throw new moodle_exception('Could not upgrade oauth token');
|
||||
}
|
||||
|
||||
|
@ -551,7 +551,7 @@ abstract class oauth2_client extends curl {
|
||||
$response = $this->post($this->token_url(), $this->build_post_data($params));
|
||||
}
|
||||
|
||||
if (!$this->info['http_code'] === 200) {
|
||||
if ($this->info['http_code'] !== 200) {
|
||||
throw new moodle_exception('Could not upgrade oauth token');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user