Skip to content

Commit 40ac65e

Browse files
authored
Merge pull request #1497 from cfwheels/architecture-3.0
Fix for user-defined function
2 parents e2d88d9 + 40e6e84 commit 40ac65e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

vendor/wheels/Controller.cfc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,11 @@ component output="false" displayName="Controller" extends="wheels.Global"{
165165
local.functionName = local.method.name;
166166

167167
// Only add public, non-inherited methods
168-
if (local.method.access eq "public") {
168+
if (
169+
local.method.access eq "public"
170+
&& !structKeyExists(variables, local.method.name)
171+
&& !structKeyExists(this, local.method.name)
172+
) {
169173
variables[local.functionName] = componentInstance[local.functionName];
170174
this[local.functionName] = componentInstance[local.functionName];
171175
}

vendor/wheels/Model.cfc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,11 @@ component output="false" displayName="Model" extends="wheels.Global"{
488488
local.functionName = local.method.name;
489489

490490
// Only add public, non-inherited methods
491-
if (local.method.access eq "public") {
491+
if (
492+
local.method.access eq "public"
493+
&& !structKeyExists(variables, local.method.name)
494+
&& !structKeyExists(this, local.method.name)
495+
) {
492496
variables[local.functionName] = componentInstance[local.functionName];
493497
this[local.functionName] = componentInstance[local.functionName];
494498
}

0 commit comments

Comments
 (0)