You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicfunctionget(string! key, var defaultValue = null) ->var
{
returnthis->getUnserializedData(
this->getAdapter()->get(key),
defaultValue
);
}
This is a solution
in Phalcon/Session/Adapter/AbstractAdapter::read()
public function read(var id) -> string
{
var data;
let data = this->adapter->get(id);
return is_null(data) ? "" : data;
}
And in test unit Phalcon\Test\Integration\Session\Adapter\Redis\ReadCest::sessionAdapterRedisRead()
should add test for another possible situation (if session_id(key) does not exist in redis)
4.0.0
7.3.6
I got this
That is because
SessionHandlerInterface::read
expectstring
as return value but actually returnnull
cphalcon/phalcon/Session/Adapter/AbstractAdapter.zep
Lines 54 to 57 in 3d76cda
Phalcon\Session\Adapter\Redis::get()
may returnnull
cphalcon/phalcon/Storage/Adapter/Redis.zep
Lines 96 to 102 in 3d76cda
This is a solution
in
Phalcon/Session/Adapter/AbstractAdapter::read()
And in test unit
Phalcon\Test\Integration\Session\Adapter\Redis\ReadCest::sessionAdapterRedisRead()
should add test for another possible situation (if session_id(key) does not exist in redis)
cphalcon/tests/integration/Session/Adapter/Redis/ReadCest.php
Lines 36 to 48 in 3d76cda
Test if session_id(key) does not exist in redis
So do as
Phalcon\Session\Adapter\Libmemcached::get()
The text was updated successfully, but these errors were encountered: