From 43fa315abd62f0c07e1f5220c2539a58c0819097 Mon Sep 17 00:00:00 2001 From: Dave L Date: Sat, 10 Jan 2026 11:20:39 -0800 Subject: [PATCH] Bugfix: Check if ColdboxVirtualApp Exists Before Shutdown If you set `this.unLoadColdbox = true; ` in your tests, there won't be a `ColdboxVirtualApp` in the `request` scope and the page will throw an exception "The key [COLDBOXVIRTUALAPP] does not exist in the request scope, the structure is empty" --- test-harness/tests/Application.cfc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test-harness/tests/Application.cfc b/test-harness/tests/Application.cfc index eeecba5..193b8b8 100644 --- a/test-harness/tests/Application.cfc +++ b/test-harness/tests/Application.cfc @@ -74,7 +74,9 @@ component{ } public void function onRequestEnd( required targetPage ) { - request.coldBoxVirtualApp.shutdown(); + if ( request.keyExists( "coldBoxVirtualApp" ) ) { + request.coldBoxVirtualApp.shutdown(); + } } private boolean function shouldEnableFullNullSupport() {