Switching to Symfony Mailer (#629)

* Switching to Symfony Mailer

Additionally, support for all versions of PHP below 7.4 has been withdrawn

* Language variable for reply to

* Update to PHP 7.4
This commit is contained in:
Yury Pikhtarev 2023-03-20 01:26:26 +07:00 committed by GitHub
commit faf2306862
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 1450 additions and 584 deletions

View file

@ -14,8 +14,8 @@ if (!defined('BB_ROOT')) {
/**
* Check PHP version
*/
if (PHP_VERSION_ID < 70103) {
die('TorrentPier requires PHP version 7.1.3+. Your PHP version ' . PHP_VERSION);
if (PHP_VERSION_ID < 70400) {
die('TorrentPier requires PHP version 7.4+. Your PHP version ' . PHP_VERSION);
}
/**
@ -88,10 +88,16 @@ define('COOKIE_MAX_TRACKS', 90);
* @param bool $httponly
* @return bool
*/
function bb_setcookie($name, $val, $lifetime = COOKIE_PERSIST, $httponly = false)
function bb_setcookie($name, $val, int $lifetime = COOKIE_PERSIST, bool $httponly = false)
{
global $bb_cfg;
return setcookie($name, $val, $lifetime, $bb_cfg['script_path'], $bb_cfg['cookie_domain'], $bb_cfg['cookie_secure'], $httponly);
return setcookie($name, $val, [
'expires' => $lifetime,
'path' => $bb_cfg['script_path'],
'domain' => $bb_cfg['cookie_domain'],
'secure' => $bb_cfg['cookie_secure'],
'httponly' => $httponly,
]);
}
/**