Skip to content
Snippets Groups Projects
Commit 6aa1bec4 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Using assert() code in session handler. And using default value from getValue form configuration

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@371 44740490-163a-0410-bde0-09ae8108e29a
parent df51aa18
No related branches found
No related tags found
No related merge requests found
...@@ -99,24 +99,9 @@ abstract class SimpleSAML_SessionHandler { ...@@ -99,24 +99,9 @@ abstract class SimpleSAML_SessionHandler {
assert($config instanceof SimpleSAML_Configuration); assert($config instanceof SimpleSAML_Configuration);
/* Get the session handler option from the configuration. */ /* Get the session handler option from the configuration. */
$handler = $config->getValue('session.handler'); $handler = $config->getValue('session.handler', 'phpsession');
/* If 'session.handler' is NULL or unset, then we want assert('is_string($handler)');
* to fall back to the default PHP session handler.
*/
if(is_null($handler)) {
$handler = 'phpsession';
}
/* The session handler must be a string. */
if(!is_string($handler)) {
$e = 'Invalid setting for the \'session.handler\'' .
' configuration option. This option should be' .
' set to a valid string.';
error_log($e);
die($e);
}
$handler = strtolower($handler); $handler = strtolower($handler);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment