Skip to content

Commit 50dfd35

Browse files
authored
Merge pull request #1490 from cfwheels/architecture-3.0
Removing Evaluates
2 parents 827efb3 + de908e9 commit 50dfd35

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

vendor/wheels/controller/processing.cfc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,22 @@ component {
6363
if (Len(local.appendToKey)) {
6464
for (local.item in local.appendToKey) {
6565
if (IsDefined(local.item)) {
66-
local.key &= Evaluate(local.item);
66+
scopeMap = {
67+
"request": request,
68+
"arguments": arguments,
69+
"application": application,
70+
"session": session,
71+
"variables": variables
72+
};
73+
74+
// Extract scope name and variable name from local.item
75+
local.scopeName = listFirst(local.item, ".");
76+
local.varName = listLast(local.item, ".");
77+
if (structKeyExists(scopeMap, local.scopeName) && structKeyExists(scopeMap[local.scopeName], local.varName)) {
78+
local.key &= scopeMap[local.scopeName][local.varName];
79+
} else {
80+
throw(type = "Wheels.KeyNotFound", message = "The `#local.item#` argument was not found.");
81+
}
6782
}
6883
}
6984
}

0 commit comments

Comments
 (0)