mirror of
				https://github.com/Mibew/i18n.git
				synced 2025-11-01 01:36:57 +03:00 
			
		
		
		
	Fix notice about undefined index 'visitorid' in libs/chat.php
This commit is contained in:
		
							parent
							
								
									48d0159a92
								
							
						
					
					
						commit
						df38a1860f
					
				| @ -657,17 +657,19 @@ function chat_start_for_user($group_id, $visitor_id, $visitor_name, $referrer, $ | ||||
| 	$_SESSION['threadid'] = $thread->id; | ||||
| 
 | ||||
| 	// Check if invitation accept
 | ||||
| 	$operator = invitation_accept($_SESSION['visitorid'], $thread->id); | ||||
| 	if ($operator) { | ||||
| 		$operator = operator_by_id($operator); | ||||
| 		$operator_name = get_operator_name($operator); | ||||
| 		$thread->postMessage( | ||||
| 			Thread::KIND_FOR_AGENT, | ||||
| 			getstring2( | ||||
| 				'chat.visitor.invitation.accepted', | ||||
| 				array($operator_name) | ||||
| 			) | ||||
| 		); | ||||
| 	if (Settings::get('enabletracking')) { | ||||
| 		$operator = invitation_accept($_SESSION['visitorid'], $thread->id); | ||||
| 		if ($operator) { | ||||
| 			$operator = operator_by_id($operator); | ||||
| 			$operator_name = get_operator_name($operator); | ||||
| 			$thread->postMessage( | ||||
| 				Thread::KIND_FOR_AGENT, | ||||
| 				getstring2( | ||||
| 					'chat.visitor.invitation.accepted', | ||||
| 					array($operator_name) | ||||
| 				) | ||||
| 			); | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	// Send some messages
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user