From d2decc7fb0ee5312afff4f8ac880697229cab57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dagef=C3=B6rde?= Date: Tue, 4 Apr 2017 21:02:51 +0200 Subject: [PATCH] MDL-58489 core: Fix unreachable HTTP error handling --- lib/oauthlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oauthlib.php b/lib/oauthlib.php index 7d83e82e68b..b84c882e795 100644 --- a/lib/oauthlib.php +++ b/lib/oauthlib.php @@ -504,7 +504,7 @@ abstract class oauth2_client extends curl { $response = $this->post($this->token_url(), $params); } - if (!$this->info['http_code'] === 200) { + if ($this->info['http_code'] !== 200) { throw new moodle_exception('Could not upgrade oauth token'); }