Skip to content
Snippets Groups Projects
Commit 897e2a7d authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fix Psalm-issues in SessionHandlerPHP.php

parent 41435519
No related branches found
No related tags found
No related merge requests found
...@@ -168,6 +168,10 @@ class SessionHandlerPHP extends SessionHandler ...@@ -168,6 +168,10 @@ class SessionHandlerPHP extends SessionHandler
if (($sid_length * $sid_bits_per_char) < 128) { if (($sid_length * $sid_bits_per_char) < 128) {
Logger::warning("Unsafe defaults used for sessionId generation!"); Logger::warning("Unsafe defaults used for sessionId generation!");
} }
/**
* This annotation may be removed as soon as we start using vimeo/psalm 3.x
* @psalm-suppress TooFewArguments
*/
$sessionId = session_create_id(); $sessionId = session_create_id();
} else { } else {
$sessionId = bin2hex(openssl_random_pseudo_bytes(16)); $sessionId = bin2hex(openssl_random_pseudo_bytes(16));
...@@ -364,7 +368,7 @@ class SessionHandlerPHP extends SessionHandler ...@@ -364,7 +368,7 @@ class SessionHandlerPHP extends SessionHandler
); );
} }
session_id($sessionID); session_id(strval($sessionID));
@session_start(); @session_start();
} }
} }
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