Stacktrace Reference:
Plaintext
Whoops\Exception\ErrorException thrown with message "Undefined array key "tech""
Stacktrace:
#4 Whoops\Exception\ErrorException in /var/www/html/admin/modules/endpoint/functions.inc/functions_common.php:317
#3 Whoops\Run:handleError in /var/www/html/admin/modules/endpoint/functions.inc/functions_common.php:317
#2 endpoint_save_extensionHook in /var/www/html/admin/modules/endpoint/functions.inc.php:477
#1 endpoint_core_process in /var/www/html/admin/libraries/components.class.php:470
#0 component:processconfigpage in /var/www/html/admin/config.php:454
Root Cause Analysis:
In functions_common.php (inside the Endpoint module structure), the code natively accesses $_POST['tech'] without a safety fallback or existence check. While previous legacy versions of PHP (like 7.4) handled unassigned array bounds with a silent notice, PHP 8.2 safely upgrades this pattern into a fatal execution halt.
Suggested Fix:
Add a null-coalescing fallback or an explicit isset() validation wrapper within the Endpoint hook code before accessing the POST array boundaries, matching modern PHP 8.2 standards:
if (!isset($_POST[‘tech’])) {
$_POST[‘tech’] = ‘none’; // Or default fallback mapping for User & Device mode
}
Whoops\Exception\ErrorException thrown with message “Undefined array key “tech””
Stacktrace:
#4 Whoops\Exception\ErrorException in /var/www/html/admin/modules/endpoint/functions.inc/functions_common.php:317
#3 Whoops\Run:handleError in /var/www/html/admin/modules/endpoint/functions.inc/functions_common.php:317
#2 endpoint_save_extensionHook in /var/www/html/admin/modules/endpoint/functions.inc.php:477
#1 endpoint_core_process in /var/www/html/admin/libraries/components.class.php:470
#0 component:processconfigpage in /var/www/html/admin/config.php:454