From 5ad3b0caf72fa0db860aafc918213f0200c2bb1e Mon Sep 17 00:00:00 2001 From: TheWitness Date: Thu, 15 Oct 2026 09:44:58 -0400 Subject: [PATCH] Fix incorrect maint functions include path The maint plugin relocated functions.php to includes/functions.php, so the old require_once(plugins/maint/functions.php) now fatals with a missing file whenever the maint plugin is enabled. Probe for the relocated includes/functions.php first and fall back to the legacy top-level path, logging an error if neither exists instead of fataling. The downstream plugin_maint_check_webseer_url() call is already guarded by function_exists(), so a missing include degrades gracefully. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- webseer_process.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webseer_process.php b/webseer_process.php index daf0ade..ba0bc7b 100644 --- a/webseer_process.php +++ b/webseer_process.php @@ -107,7 +107,13 @@ } if (api_plugin_is_enabled('maint')) { - require_once($config['base_path'] . '/plugins/maint/functions.php'); + if (file_exists($config['base_path'] . '/plugins/maint/includes/functions.php')) { + require_once($config['base_path'] . '/plugins/maint/includes/functions.php'); + } else if (file_exists($config['base_path'] . '/plugins/maint/functions.php')) { + require_once($config['base_path'] . '/plugins/maint/functions.php'); + } else { + cacti_log('ERROR: cannot include maint functions', false, 'WEBSEER'); + } } if (function_exists('plugin_maint_check_webseer_url')) {