Files
XC_VM/src/Streaming/Lifecycle
Divarion_D 82a0cd0289 fix: harden null/missing-data access surfaced by panel error logs
Fixes five runtime errors seen in production panel logs (v2.3.9):

- HomeController: player home page fatally crashed (count(): null given)
  when content/tmdb_popular was absent or corrupt. Guard the read +
  unserialize, default movies/series to arrays, null-safe the counts.
- ShutdownHandler: "array offset on null" on every live session close
  when $rChannelInfo was null (vod/timeshift or early exit). Use !empty().
- ProcessManager::acquireCronLock: TOCTOU race — a competing cron removed
  the lock file between file_exists() and file_get_contents()/filemtime(),
  emitting "failed to open stream"/"stat failed". Read content+mtime once
  under @, and take the lock if the file vanished.
- AuthRepository::updateCodes: "foreach() argument must be array, null"
  when a code's whitelist JSON decoded to null. Cast to (array).
- admin/review.php: "Undefined array key extension" for URLs without an
  extension. Coalesce pathinfo()['extension'] to ''.
2026-08-15 23:42:16 +03:00
..