From 48d0159a92bf51488e83958dab5c4a39ba985028 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Mon, 15 Apr 2013 11:53:45 +0000 Subject: [PATCH] Fix notice about undefined index 'visitorid' in client.php --- src/messenger/webim/client.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/messenger/webim/client.php b/src/messenger/webim/client.php index 1f24a69d..b0f4eed4 100644 --- a/src/messenger/webim/client.php +++ b/src/messenger/webim/client.php @@ -105,10 +105,13 @@ if( !isset($_GET['token']) || !isset($_GET['thread']) ) { } // Get invitation info - $invitation_state = invitation_state($_SESSION['visitorid']); - $visitor_is_invited = Settings::get('enabletracking') - && $invitation_state['invited'] - && !$invitation_state['threadid']; + if (Settings::get('enabletracking')) { + $invitation_state = invitation_state($_SESSION['visitorid']); + $visitor_is_invited = $invitation_state['invited'] + && !$invitation_state['threadid']; + } else { + $visitor_is_invited = false; + } // Check if survey should be displayed if(Settings::get('enablepresurvey') == '1' && !$visitor_is_invited) {