fix(api): handle null from probeSource() to prevent array offset on null

This commit is contained in:
Divarion-D
2026-04-06 19:37:40 +03:00
parent a3e203bcef
commit 74362ff70b
+3 -2
View File
@@ -2500,8 +2500,9 @@ if (isset($_SESSION['hash'])) {
}
if (!$rStreamInfo) {
$rStreamInfo = ServerRepository::probeSource($rServerID, RequestManager::getAll()['url'], (RequestManager::getAll()['user_agent'] ?? null), (RequestManager::getAll()['http_proxy'] ?? null), (RequestManager::getAll()['cookies'] ?? null), (RequestManager::getAll()['headers'] ?? null))['data'];
$rStreamInfo['container'] = $rStreamInfo['format']['format_name'];
$rProbeResult = ServerRepository::probeSource($rServerID, RequestManager::getAll()['url'], (RequestManager::getAll()['user_agent'] ?? null), (RequestManager::getAll()['http_proxy'] ?? null), (RequestManager::getAll()['cookies'] ?? null), (RequestManager::getAll()['headers'] ?? null));
$rStreamInfo = $rProbeResult['data'] ?? [];
$rStreamInfo['container'] = $rStreamInfo['format']['format_name'] ?? '';
}
}