mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 02:31:33 -04:00
replace setcookie value with '' instead of null.
The php documentation states that an empty string should be used for a cookie when it has no real value. null leads to the following error: expects parameter 2 to be string, null given Signed-off-by: Martin Böh <mart.b@outlook.de>
This commit is contained in:
parent
fb9379db3e
commit
fbc1f5cd38
2 changed files with 2 additions and 2 deletions
|
|
@ -441,7 +441,7 @@ class OC {
|
|||
// session timeout
|
||||
if ($session->exists('LAST_ACTIVITY') && (time() - $session->get('LAST_ACTIVITY') > $sessionLifeTime)) {
|
||||
if (isset($_COOKIE[session_name()])) {
|
||||
setcookie(session_name(), null, -1, self::$WEBROOT ? : '/');
|
||||
setcookie(session_name(), '', -1, self::$WEBROOT ? : '/');
|
||||
}
|
||||
\OC::$server->getUserSession()->logout();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class Internal extends Session {
|
|||
try {
|
||||
$this->invoke('session_start');
|
||||
} catch (\Exception $e) {
|
||||
setcookie($this->invoke('session_name'), null, -1, \OC::$WEBROOT ?: '/');
|
||||
setcookie($this->invoke('session_name'), '', -1, \OC::$WEBROOT ?: '/');
|
||||
}
|
||||
restore_error_handler();
|
||||
if (!isset($_SESSION)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue