From b136ced614e1aedc9a26a825e968f6d450adafb3 Mon Sep 17 00:00:00 2001 From: cicalese Date: Fri, 7 Feb 2014 18:31:26 -0500 Subject: [PATCH] Check if $_REQUEST["code"] exists A warning is generated if $_REQUEST["code"] does not exist. --- OpenIDConnectClient.php5 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenIDConnectClient.php5 b/OpenIDConnectClient.php5 index 42fba9e3..f1a97d48 100644 --- a/OpenIDConnectClient.php5 +++ b/OpenIDConnectClient.php5 @@ -125,7 +125,12 @@ class OpenIDConnectClient */ public function authenticate() { - $code = $_REQUEST["code"]; + if (array_key_exists("code", $_REQUEST)) { + $code = $_REQUEST["code"]; + } else { + $code = null; + } + // If we have an authorization code then proceed to request a token if ($code) {