app/library/Services.php: in _initSession() must pass a factory to adapter in phalcon 4
This commit is contained in:
parent
ee5c7719cb
commit
d7af32a1d7
1 changed files with 5 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ use Phalcon\Di\FactoryDefault as DiDefault,
|
|||
Phalcon\Cache\Frontend\Data as FrontendDataCache,
|
||||
Phalcon\Cache\Backend\Apc as BackendApcCache,
|
||||
Phalcon\Translate\Adapter\NativeArray as TranslateAdapter,
|
||||
Phalcon\Storage\AdapterFactory as StorageAdapterFactory,
|
||||
Phalcon\Logger,
|
||||
Phalcon\Mvc\Router;
|
||||
|
||||
|
|
@ -195,8 +196,11 @@ class Services extends DiDefault
|
|||
$adapter_name = isset($data['adapter']) ? $data['adapter'] : 'Stream';
|
||||
$options = $data['options'];
|
||||
|
||||
$serializerFactory = new \Phalcon\Storage\SerializerFactory();
|
||||
$factory = new StorageAdapterFactory($serializerFactory);
|
||||
|
||||
$class = 'Phalcon\Session\Adapter\\' . $adapter_name;
|
||||
$adapter = new $class($options);
|
||||
$adapter = new $class($factory, $options);
|
||||
}
|
||||
// Default to Stream
|
||||
else {
|
||||
|
|
|
|||
Reference in a new issue