mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-58489 core: Fix unreachable HTTP error handling
This commit is contained in:
parent
bd99cb9021
commit
eb4ab7c4b8
2 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue