MDL-58489 core: Fix unreachable HTTP error handling

This commit is contained in:
Jan Dageförde 2017-04-04 21:02:51 +02:00
parent bd99cb9021
commit eb4ab7c4b8
No known key found for this signature in database
GPG Key ID: CD1CFFF8C775F555
2 changed files with 2 additions and 2 deletions

View File

@ -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');
}

View File

@ -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');
}