mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Minor fixes (#662)
This commit is contained in:
parent
048ce1183e
commit
6e666695e8
2 changed files with 10 additions and 10 deletions
12
common.php
12
common.php
|
@ -52,12 +52,6 @@ if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
|
|||
}
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
/**
|
||||
* Progressive error reporting
|
||||
*/
|
||||
define('DBG_USER', (isset($_COOKIE[COOKIE_DBG])));
|
||||
\TorrentPier\Dev::debug_init();
|
||||
|
||||
/**
|
||||
* Gets the value of an environment variable.
|
||||
*
|
||||
|
@ -80,6 +74,12 @@ if (file_exists(__DIR__ . '/library/config.local.php')) {
|
|||
require_once __DIR__ . '/library/config.local.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Progressive error reporting
|
||||
*/
|
||||
define('DBG_USER', (isset($_COOKIE[COOKIE_DBG])));
|
||||
\TorrentPier\Dev::debug_init();
|
||||
|
||||
$server_protocol = $bb_cfg['cookie_secure'] ? 'https://' : 'http://';
|
||||
$server_port = in_array((int)$bb_cfg['server_port'], array(80, 443), true) ? '' : ':' . $bb_cfg['server_port'];
|
||||
define('FORUM_PATH', $bb_cfg['script_path']);
|
||||
|
|
|
@ -44,12 +44,12 @@ class Sessions
|
|||
/**
|
||||
* Set userdata to cache
|
||||
*
|
||||
* @param array $userdata
|
||||
* @param array|null $userdata
|
||||
* @param bool $force
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function cache_set_userdata(array $userdata, bool $force = false): bool
|
||||
public static function cache_set_userdata(?array $userdata, bool $force = false): bool
|
||||
{
|
||||
global $bb_cfg;
|
||||
|
||||
|
@ -97,11 +97,11 @@ class Sessions
|
|||
/**
|
||||
* Update userdata in cache
|
||||
*
|
||||
* @param array $userdata
|
||||
* @param array|null $userdata
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function cache_update_userdata(array $userdata): bool
|
||||
public static function cache_update_userdata(?array $userdata): bool
|
||||
{
|
||||
return self::cache_set_userdata($userdata, true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue