mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
IP storage and attachment system bugfix. PHP 5.6+.
This commit is contained in:
parent
b06bb45700
commit
8c6097f5d8
14 changed files with 74 additions and 123 deletions
22
common.php
22
common.php
|
@ -114,13 +114,6 @@ if (file_exists(__DIR__ . '/library/config.local.php')) {
|
|||
require_once __DIR__ . '/library/config.local.php';
|
||||
}
|
||||
|
||||
// Bugsnag error reporting
|
||||
if ($bb_cfg['bugsnag']['enabled'] && !empty($bb_cfg['bugsnag']['api_key'])) {
|
||||
/** @var Bugsnag\Handler $bugsnag */
|
||||
$bugsnag = Bugsnag\Client::make($bb_cfg['bugsnag']['api_key']);
|
||||
Bugsnag\Handler::register($bugsnag);
|
||||
}
|
||||
|
||||
$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']);
|
||||
|
@ -156,12 +149,19 @@ define('GUEST_UID', -1);
|
|||
define('BOT_UID', -746);
|
||||
|
||||
/**
|
||||
* Whoops error handler
|
||||
* Progressive error reporting
|
||||
*/
|
||||
if (DBG_USER) {
|
||||
$whoops = new \Whoops\Run;
|
||||
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
|
||||
$whoops->register();
|
||||
if ($bb_cfg['bugsnag']['enabled'] && !empty($bb_cfg['bugsnag']['api_key'])) {
|
||||
/** @var Bugsnag\Handler $bugsnag */
|
||||
$bugsnag = Bugsnag\Client::make($bb_cfg['bugsnag']['api_key']);
|
||||
Bugsnag\Handler::register($bugsnag);
|
||||
} else {
|
||||
/** @var Whoops\Run $whoops */
|
||||
$whoops = new \Whoops\Run;
|
||||
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
|
||||
$whoops->register();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue