From: Steve Sutton Date: Thu, 2 Nov 2017 15:32:20 +0000 (-0400) Subject: Fixing the bug in the get cart method when not logged in. X-Git-Tag: v1.0.0^2~303 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=b5d7a59197df8a435e81ae652342f34ea46b2306;p=WP-Plugins%2Fglm-member-db-registrations.git 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. --- 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; }