Skip to content
Snippets Groups Projects
Unverified Commit e968169e authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Make it explicit that fetching or creating a session handler could throw an exception

This could happen when the handler is depending on a PHP extension, or connection to a database fails, or any other circumstance that may trigger an exception in the constructor of the session handler itself. We should be aware of this when using the session handler, therefore we update the phpdoc here to reflect that.
parent 29b63583
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,8 @@ abstract class SessionHandler ...@@ -32,6 +32,8 @@ abstract class SessionHandler
* to this function. * to this function.
* *
* @return \SimpleSAML\SessionHandler The current session handler. * @return \SimpleSAML\SessionHandler The current session handler.
*
* @throws \Exception If we cannot instantiate the session handler.
*/ */
public static function getSessionHandler() public static function getSessionHandler()
{ {
...@@ -126,6 +128,8 @@ abstract class SessionHandler ...@@ -126,6 +128,8 @@ abstract class SessionHandler
* PHP session handler. * PHP session handler.
* *
* @return void * @return void
*
* @throws \Exception If we cannot instantiate the session handler.
*/ */
private static function createSessionHandler() private static function createSessionHandler()
{ {
......
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