Issue #3470075 by andypost, ankitv18: PHP 8.4 GET/POST sessions are deprecated

(cherry picked from commit 685891702d)
merge-requests/9437/head
catch 2024-08-31 08:50:57 +09:00
parent 213e9669d3
commit 763460d2d3
1 changed files with 4 additions and 2 deletions

View File

@ -1066,8 +1066,10 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
// Use session cookies, not transparent sessions that puts the session id
// in the query string.
ini_set('session.use_cookies', '1');
ini_set('session.use_only_cookies', '1');
ini_set('session.use_trans_sid', '0');
if (\PHP_VERSION_ID < 80400) {
ini_set('session.use_only_cookies', '1');
ini_set('session.use_trans_sid', '0');
}
// Don't send HTTP headers using PHP's session handler.
// Send an empty string to disable the cache limiter.
ini_set('session.cache_limiter', '');