8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symfony version(s) affected: >=4.4
Description By introducing the great Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory it is possible to configure session handler via DSN. But if I want to use the NativeFileSessionHandler to use configured session.save_path of php.ini, it doesn't work as expected because the $savePath constructor param is an empty string (and not NULL) by using "file://" as DSN.
How to reproduce SessionHandlerFactory::createHandler('file://');
$savePath will be an empty string https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php#L33
Possible Solution
something like
$savePath = substr('file://', 7); return new StrictSessionHandler(new NativeFileSessionHandler($savePath === '' ? null: $savePath));
instead of
return new StrictSessionHandler(new NativeFileSessionHandler(substr($connection, 7)));
Additional context
The text was updated successfully, but these errors were encountered:
6a4dcde
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected: >=4.4
Description
By introducing the great Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory it is possible to configure session handler via DSN. But if I want to use the NativeFileSessionHandler to use configured session.save_path of php.ini, it doesn't work as expected because the $savePath constructor param is an empty string (and not NULL) by using "file://" as DSN.
How to reproduce
SessionHandlerFactory::createHandler('file://');
$savePath will be an empty string
https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php#L33
Possible Solution
https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php#L51
something like
instead of
Additional context
The text was updated successfully, but these errors were encountered: