Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -31,13 +31,17 @@ class _Redis extends \IPS\Session\Store
|
||||
* Load the session from the storage engine
|
||||
*
|
||||
* @param string $sessionId Session ID
|
||||
* @return array
|
||||
* @return array|NULL
|
||||
*/
|
||||
public function loadSession( $sessionId )
|
||||
{
|
||||
if ( $result = \IPS\Redis::i()->hGetAll( static::_key( 'session_id_' . md5( $sessionId . \IPS\Settings::i()->sql_pass ) ) ) )
|
||||
{
|
||||
return \IPS\Redis::i()->decode( $result['data'] );
|
||||
{
|
||||
try
|
||||
{
|
||||
return \IPS\Redis::i()->decode( $result['data'] );
|
||||
}
|
||||
catch( \RedisException $e ){}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -136,7 +140,11 @@ class _Redis extends \IPS\Session\Store
|
||||
{
|
||||
$session = \IPS\Redis::i()->hMGet( $redisKey, array( 'data' ) );
|
||||
|
||||
$sessionMap[ $index ] = \IPS\Redis::i()->decode( $session['data'] );
|
||||
try
|
||||
{
|
||||
$sessionMap[ $index ] = \IPS\Redis::i()->decode( $session['data'] );
|
||||
}
|
||||
catch( \RedisException $e ){}
|
||||
}
|
||||
|
||||
foreach( $sessionMap as $session )
|
||||
@@ -196,8 +204,12 @@ class _Redis extends \IPS\Session\Store
|
||||
if ( $id == $memberId )
|
||||
{
|
||||
if ( $result = \IPS\Redis::i()->hGetAll( static::_key( $sessionKey ) ) )
|
||||
{
|
||||
return \IPS\Redis::i()->decode( $result['data'] );
|
||||
{
|
||||
try
|
||||
{
|
||||
return \IPS\Redis::i()->decode( $result['data'] );
|
||||
}
|
||||
catch( \RedisException $e ){}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -368,7 +380,14 @@ class _Redis extends \IPS\Session\Store
|
||||
{
|
||||
if ( $field === 'data' )
|
||||
{
|
||||
$data = \IPS\Redis::i()->decode( $results[ $i++ ] );
|
||||
try
|
||||
{
|
||||
$data = \IPS\Redis::i()->decode( $results[ $i++ ] );
|
||||
}
|
||||
catch( \RedisException $e )
|
||||
{
|
||||
$data = NULL;
|
||||
}
|
||||
}
|
||||
/* login_type must be cast as an integer or else anonymous state can be lost when adjustSessions() runs */
|
||||
elseif( $field === 'login_type' )
|
||||
|
||||
Reference in new issue
Block a user