Skip to content

Commit a62978b

Browse files
Copilotgrantcopley
andcommitted
Initialize appMetadata as struct and use structCount check
Co-authored-by: grantcopley <[email protected]>
1 parent f1b69f9 commit a62978b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/services/TokenService.cfc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ component accessors="true" singleton {
1919
/**
2020
* Cache for application metadata to avoid repeated lookups
2121
*/
22-
variables.appMetadata = "";
22+
variables.appMetadata = {};
2323

2424
/**
2525
* Generates a CBWIRE-specific token that doesn't expire.
@@ -97,7 +97,7 @@ component accessors="true" singleton {
9797
* @return True if session management is enabled, false otherwise
9898
*/
9999
private function isSessionManagementEnabled() {
100-
if ( !isStruct( variables.appMetadata ) ) {
100+
if ( !structCount( variables.appMetadata ) ) {
101101
variables.appMetadata = getApplicationMetadata();
102102
}
103103
return structKeyExists( variables.appMetadata, "sessionManagement" ) && variables.appMetadata.sessionManagement;

0 commit comments

Comments
 (0)