Use correct array index access for switchBoardSessions in sendMessageToSBSession
This commit is contained in:
parent
7b998f4b2a
commit
6f388a8b50
@ -1392,7 +1392,6 @@ class MSN {
|
|||||||
$this->switchBoardSessionLookup[$to] = $socket;
|
$this->switchBoardSessionLookup[$to] = $socket;
|
||||||
|
|
||||||
// Store the socket in the sessions array
|
// Store the socket in the sessions array
|
||||||
$intsocket = (int) $socket;
|
|
||||||
$this->switchBoardSessions[$to] = array(
|
$this->switchBoardSessions[$to] = array(
|
||||||
'to' => $to,
|
'to' => $to,
|
||||||
'socket' => $socket,
|
'socket' => $socket,
|
||||||
@ -1403,6 +1402,7 @@ class MSN {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Change the index of the session to the socket
|
// Change the index of the session to the socket
|
||||||
|
$intsocket = (int) $socket;
|
||||||
$this->switchBoardSessions[$intsocket] = $this->switchBoardSessions[$to];
|
$this->switchBoardSessions[$intsocket] = $this->switchBoardSessions[$to];
|
||||||
unset($this->switchBoardSessions[$to]);
|
unset($this->switchBoardSessions[$to]);
|
||||||
|
|
||||||
@ -1457,13 +1457,13 @@ class MSN {
|
|||||||
if (self::socketcheck($socket)) {
|
if (self::socketcheck($socket)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->switchBoardSessions[$to]['joined']) {
|
$intsocket = (int) $socket;
|
||||||
|
if (!$this->switchBoardSessions[$intsocket]['joined']) {
|
||||||
// If our participant has not joined the session yet we can't message them!
|
// If our participant has not joined the session yet we can't message them!
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$intsocket = (int) $socket;
|
|
||||||
$id = &$this->switchBoardSessions[$intsocket]['id'];
|
$id = &$this->switchBoardSessions[$intsocket]['id'];
|
||||||
|
|
||||||
$aMessage = $this->getMessage($Message);
|
$aMessage = $this->getMessage($Message);
|
||||||
|
Loading…
Reference in New Issue
Block a user