More correct assignment of the $path_info value (view_video.php)

This commit is contained in:
IgorA100
2026-05-06 17:33:04 +03:00
committed by GitHub
parent fc9a8c593e
commit 08f7afe6a4

View File

@@ -114,7 +114,7 @@ if ( isset($_SERVER['HTTP_RANGE']) ) {
}
} # end if HTTP_RANGE
$path_info = ($mode == 'mp4') ? pathinfo($path) : pathinfo($Event->DefaultVideo());
$path_info = pathinfo($path ? $path : (($Event) ? $Event->DefaultVideo() : ''));
header('Content-type: video/'.$path_info['extension']);
header('Accept-Ranges: bytes');
header('Content-Length: '.$length);