From b5d7a59197df8a435e81ae652342f34ea46b2306 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 2 Nov 2017 11:32:20 -0400 Subject: [PATCH] Fixing the bug in the get cart method when not logged in. If not logged in there may not be session loggin variable so need to check for not isset first. --- classes/regCartSupport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/regCartSupport.php b/classes/regCartSupport.php index 760c755..211849c 100644 --- a/classes/regCartSupport.php +++ b/classes/regCartSupport.php @@ -723,7 +723,7 @@ class GlmRegCartSupport } // If it's a guest account and the request ID is in the current session - allow cart - if ( isset( $_SESSION['LoginAccount'] ) && $_SESSION['LoginAccount']['id'] == 0 && $_SESSION['glm_reg_cart_id'] == $requestId) { + if ( !isset( $_SESSION['LoginAccount'] ) || isset( $_SESSION['LoginAccount'] ) && $_SESSION['LoginAccount']['id'] == 0 && $_SESSION['glm_reg_cart_id'] == $requestId) { return true; } -- 2.17.1