fix: move register_shutdown_function after init.php require in streaming endpoints

ShutdownHandler::handle() depends on classes and globals initialized in
init.php. Registering it before require_once "init.php" caused a fatal
error (class not found) when the shutdown handler fired.

Affected endpoints: live.php, vod.php, timeshift.php
This commit is contained in:
Divarion-D
2026-03-15 12:21:55 +03:00
parent 00cf0209e6
commit 9c5beba10f
3 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
<?php
register_shutdown_function([ShutdownHandler::class, 'handle'], 'live');
set_time_limit(0);
require_once "init.php";
register_shutdown_function([ShutdownHandler::class, 'handle'], 'live');
unset($rSettings["watchdog_data"]);
unset($rSettings["server_hardware"]);

View File

@@ -1,8 +1,8 @@
<?php
register_shutdown_function([ShutdownHandler::class, 'handle'], 'timeshift');
set_time_limit(0);
require_once 'init.php';
register_shutdown_function([ShutdownHandler::class, 'handle'], 'timeshift');
unset($rSettings['watchdog_data'], $rSettings['server_hardware']);
StreamAuthMiddleware::sendStreamHeaders($rSettings, $rServers);

View File

@@ -1,8 +1,8 @@
<?php
register_shutdown_function([ShutdownHandler::class, 'handle'], 'vod');
set_time_limit(0);
require_once 'init.php';
register_shutdown_function([ShutdownHandler::class, 'handle'], 'vod');
unset($rSettings['watchdog_data'], $rSettings['server_hardware']);
StreamAuthMiddleware::sendStreamHeaders($rSettings, $rServers);