MDL-58489 core: Fix unreachable HTTP error handling
[moodle.git] / lib / classes / oauth2 / client.php
index 5f2b8c2..d5bc03d 100644 (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');
         }