passyby doesn't work for script arguments

Description

<cffunction name="byValueTag"> <cfargument name="arr" passby="value" required="true"> <cfscript> arguments.arr.append("by value TAG"); return arguments.arr; </cfscript> </cffunction> <cfscript> function byRef (required array arr ){ arguments.arr.append("by reference"); return arguments.arr; } function byValue (required array arr passby="value"){ arguments.arr.append("by value"); return arguments.arr; } arr = ["direct"]; writedump(arr); writedump(var=byRef(arr), label="by ref"); writedump(arr); writedump(var=byValueTag(arr), label="by value TAG"); writedump(var=arr, label="by value TAG shouldn't be present" ); writedump(var=byValue(arr), label="by value SCRIPT"); writedump(var=arr, label="by value shouldn't be present" ); // but is </cfscript>

https://trycf.com/gist/387c428c779327588f101895e5385779/lucee5?theme=monokai

Environment

None

Attachments

1
  • 12 Aug 2021, 02:30 pm

Activity

Show:

Pothys - MitrahSoft 13 August 2021 at 07:59

I've checked this ticket with lucee latest version 5.3.8.201-SNAPSHOT. Yes, passBy = value doesn't work in script arguments.
I added a testcase to this ticket

Pull Request: https://github.com/lucee/Lucee/pull/1409

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Created 12 August 2021 at 14:29
Updated 6 March 2025 at 11:34

Flag notifications