mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-08-04 01:02:27 -04:00
The insert branch only logged via ZM\Error and returned, leaving $error_message empty. The dispatcher then re-rendered views/monitor.php with no banner and the user saw an apparent success that silently discarded their new monitor. Append $monitor->get_last_error() to $error_message so the existing <div id="error"> in getBodyTopHTML() shows the actual DB message, and keep the early return so the user stays on the edit view with the form values preserved by views/monitor.php's $_REQUEST['newMonitor'] handling. Matches the pattern already used on the update path at line 273. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
15 KiB
15 KiB