Skip to content

Commit 007319d

Browse files
committed
Fix for adobe
Adobe doesn't accept the third parameter for the structFind function so updated the code to make it work for both lucee and adobe
1 parent 8353f91 commit 007319d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

vendor/wheels/model/validations.cfc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,13 @@ component {
430430
local.rv = ReplaceNoCase(local.rv, local.fullMatch, Chr(35), "one");
431431
} else {
432432
// Retrieve variable value from function scope or arguments
433-
local.value = StructFind(variables, local.varName, StructFind(arguments, local.varName, local.fullMatch));
433+
if (StructKeyExists(variables, local.varName)) {
434+
local.value = variables[local.varName];
435+
} else if (StructKeyExists(arguments, local.varName)) {
436+
local.value = arguments[local.varName];
437+
} else {
438+
local.value = local.fullMatch; // Keep as-is if not found
439+
}
434440

435441
// Replace occurrences of #variable# with the actual value
436442
local.rv = ReplaceNoCase(local.rv, local.fullMatch, local.value, "one");

0 commit comments

Comments
 (0)