MDL-58489 core: Fix unreachable HTTP error handling
[moodle.git] / lib / oauthlib.php
index c684c9c..1fe80f5 100644 (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');
         }