Remove the cookie paths for php<7.3

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2020-11-06 15:57:17 +01:00
parent 3f4fb9dc89
commit 7e2c3a820e
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
3 changed files with 21 additions and 33 deletions

View File

@ -96,9 +96,6 @@ class Output implements IOutput {
public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly, $sameSite = 'Lax') {
$path = $this->webRoot ? : '/';
if (PHP_VERSION_ID < 70300) {
setcookie($name, $value, $expire, $path, $domain, $secure, $httpOnly);
} else {
setcookie($name, $value, [
'expires' => $expire,
'path' => $path,
@ -109,4 +106,3 @@ class Output implements IOutput {
]);
}
}
}

View File

@ -88,9 +88,6 @@ class CryptoWrapper {
$webRoot = '/';
}
if (PHP_VERSION_ID < 70300) {
setcookie(self::COOKIE_NAME, $this->passphrase, 0, $webRoot, '', $secureCookie, true);
} else {
setcookie(
self::COOKIE_NAME,
$this->passphrase,
@ -106,7 +103,6 @@ class CryptoWrapper {
}
}
}
}
/**
* @param ISession $session

View File

@ -214,10 +214,6 @@ class Internal extends Session {
}
private function startSession(bool $silence = false) {
if (PHP_VERSION_ID < 70300) {
$this->invoke('session_start', [], $silence);
} else {
$this->invoke('session_start', [['cookie_samesite' => 'Lax']], $silence);
}
}
}