mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-07-19 01:22:21 -04:00
These functions are PHP 8.0+ but ZoneMinder is called from views on PHP 7 installs (event.php uses str_ends_with at file scope, triggering a fatal "Call to undefined function" before the page can render). Add function_exists-guarded polyfills at the top of functions.php so PHP 8+ keeps the native implementations and PHP 7.x picks up the fallbacks. functions.php is required by index.php before any view, so all four call sites (functions.php, event.php, views/image.php) are covered. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>