Fixed docker errors and improved error logging..
This commit is contained in:
@@ -479,7 +479,7 @@ class TldRegistryService
|
||||
/**
|
||||
* Get count of TLDs that need WHOIS data
|
||||
*/
|
||||
public function getTldsNeedingWhoisCount(int $logId = null): int
|
||||
public function getTldsNeedingWhoisCount(?int $logId = null): int
|
||||
{
|
||||
if ($logId) {
|
||||
// For a specific import session, count TLDs that haven't been processed yet
|
||||
|
||||
@@ -278,7 +278,7 @@ class TwoFactorService
|
||||
/**
|
||||
* Check rate limiting for 2FA attempts
|
||||
*/
|
||||
public function checkRateLimit(string $ipAddress, int $userId = null): bool
|
||||
public function checkRateLimit(string $ipAddress, ?int $userId = null): bool
|
||||
{
|
||||
$rateLimitMinutes = (int)$this->settingModel->getValue('two_factor_rate_limit_minutes', 15);
|
||||
$since = date('Y-m-d H:i:s', time() - ($rateLimitMinutes * 60));
|
||||
|
||||
@@ -12,12 +12,30 @@ class Application
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
// Configure error reporting based on environment
|
||||
$this->configureErrorReporting();
|
||||
|
||||
self::$router = new Router();
|
||||
self::$db = new Database();
|
||||
|
||||
// Initialize error handler
|
||||
$this->errorHandler = new ErrorHandler();
|
||||
}
|
||||
|
||||
private function configureErrorReporting()
|
||||
{
|
||||
$env = $_ENV['APP_ENV'] ?? 'development';
|
||||
|
||||
if ($env === 'production') {
|
||||
// In production, suppress deprecation warnings to prevent header issues
|
||||
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
|
||||
ini_set('display_errors', '0');
|
||||
} else {
|
||||
// In development, show all errors including deprecations
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', '1');
|
||||
}
|
||||
}
|
||||
|
||||
public function run()
|
||||
{
|
||||
|
||||
@@ -114,6 +114,9 @@ for d in logs storage cache tmp runtime; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Allow installer to create .installed at project root
|
||||
chmod 775 "$APP_DIR"
|
||||
|
||||
# .env readable by root & group only
|
||||
chmod 640 "$APP_DIR/.env" || true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user