Merge pull request #1614 from ArthurHoaro/hotfix/php71-compat-login

Fix compatiliby issue on login with PHP 7.1
This commit is contained in:
ArthurHoaro 2020-10-28 14:08:08 +01:00 committed by GitHub
commit 1ca7ddd76b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -160,7 +160,7 @@ private function initialize()
$this->tpl->assign('formatter', $this->conf->get('formatter', 'default'));
$this->tpl->assign('links_per_page', $this->session['LINKS_PER_PAGE']);
$this->tpl->assign('links_per_page', $this->session['LINKS_PER_PAGE'] ?? 20);
// To be removed with a proper theme configuration.
$this->tpl->assign('conf', $this->conf);

View file

@ -293,9 +293,12 @@ public function start(): bool
return session_start();
}
public function cookieParameters(int $lifeTime, string $path, string $domain): bool
/**
* Be careful, return type of session_set_cookie_params() changed between PHP 7.1 and 7.2.
*/
public function cookieParameters(int $lifeTime, string $path, string $domain): void
{
return session_set_cookie_params($lifeTime, $path, $domain);
session_set_cookie_params($lifeTime, $path, $domain);
}
public function regenerateId(bool $deleteOldSession = false): bool