Issue happened on latest version of lucee & ACF also, It does not throwing any exception while write a struct directly to a cookie in the cookie scope. I’m checked with ACF11, ACF16 acts same way as lucee does.
Sample code :
variables.someStruct = {
‘Squirrels’: ‘Are totally cool’
};
cookie.squirrel_plain = variables.someStruct;
writeDump(cookie);
ACF returns :
[empty string]
Lucee returns :
Empty:null
If we add complex objects for array and query related value in cookie, it works fine but still fails for Struct.
Use Array to cookie :
Can’t cast Complex Object Type Array to String
Use Query to cookie :
Can’t cast Complex Object Type Query to String
Source : [LDEV-942] - Lucee
Trycf sample: TryCF.com
Please give any suggestions about this.