tracker issue : CF-4198230

select a category, or use search below
(searches all categories and all time range)
Title:

implicit constructor does not respect argumentCollection

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Henry Ho / Henry Ho ()

Created: 01/04/2017

Components: Language, CF Component

Versions: 11.0

Failure Type: Others

Found In Build/Fixed In Build: 11,0,11,301867 / 2018.0.0.314090

Priority/Frequency: Normal /

Locale/System: / Windows 10 64 bit

Vote Count: 1

Problem Description:

implicit constructor does not respect argumentCollection for setter properties with accessors = true

Steps to Reproduce:

Test.cfc

component accessors=true {
  property a;
  property b;
}

args = {a:"1",b:"2");
t = new Test(argumentCollection=arguments);
writedump(t);

Actual Result:
property a: [empty string]
property b: [empty string]

Expected Result:
property a: 1
property b: 2

Any Workarounds:
- cannot use implicit constructor, must add an init() function that would call the properties' setters

Attachments:

Comments:

When this is fixed, please patch it on CF11 and not CF2017, thanks. :)
Comment by Henry H.
1376 | February 01, 2017 08:27:26 PM GMT
subscribe
Comment by Matthew C.
1377 | February 15, 2017 10:09:17 PM GMT