Copy link to clipboard
Copied
hi there
using cf10 and FW/1 2.0 I face this EXTREEMLY STRANGE error
Please consider that code
application.utils.logme (data=#rc#, when= true, label="After addr");
if (rc.disclose_fons is 1) {
contact_coords &= (rc.res_answer_req.data.REE_FON gt "" ? rc.res_answer_req.data.REE_FON & "<br>" : "") &
(rc.res_answer_req.data.REE_MOBILE gt "" ? rc.res_answer_req.data.REE_MOBILE & "<br>" : "");
}
application.utils.logme (data=#rc#, when= true, label="After fons");
will come to here in any case of rc.disclose_fons ...
if (rc.disclose_mail is 1) {
contact_coords &= rc.res_answer_req.data.REE_EMAIL & "<br>";
}
WILL NOT COME TO THIS Logger regardless of the value in rc.disclose_mail!
So the error is generated by the line above .. be assured that all values and elements of rc.* are present and filled.
application.utils.logme (data=#rc#, when= true, label="After mail");
and now the runtime error I've never seen to far
Error: Variable ___IMPLICITARRYSTRUCTVAR17 is undefined.
Type: Expression
of course, display is by FW/1 but it's only catching the underlying stuff ....
Please note the missing A in ARRY ... don't know from where it comes but anyway.
The other day, I already found a very ugly but similar bug in Cf 9.0.1 regarding the form validation stuff .. disclose_mail is a form field. hwoever, i also tried disclose_email with the same error results. Please note that I do have this.serverSideFormValidation = false; in my application.cfc.
i also put the contact_coords into the rc structure of FW/1 to have it dumped. I attach a scrshot to show the values in step "after fons":
any hints or clues?
Thanks,
Martin
Copy link to clipboard
Copied
These ___IMPLICITARRYSTRUCTVAR errors that occasionally crop up are caused by bugs in CF, not bugs in your code. They've been lurking around in various manifestations (there's a number of bugs that cause this sort of thing) since CF9 as far as I can tell. But they might occur in CF8 too.
They're tied in to how Adobe have implemented CF's handling of "implicit" struct and array notation, ie: using {} notation to define structs and/or [] for arrays.
I don't see any code in what you quote that could cause it, but look in the vicinity for usage of that notation, and refactor it to use old-style structNew() and arrayNew() declarations, and setting the keys / values "manually".
I've seen it crop up in files included within CFC methods, when passing structs inline to CF functions and tags, and slightly "edge" cases like that. No, I don't actually think that sort of thing are "edge cases", but they seemed to be things that did not occur to Adobe when implementing these notations. Also note that different things give the errors in CF9 in CF9.0.1 and CF10, because sometimes when Adobe have fixed one of these bugs, they've caused others in other situations.
The good news is that CF10 has far fewer of these than CF9 & CF9.0.1. Well: it's good news for CF10 users, anyhow 😉
--
Adam
Copy link to clipboard
Copied
These ___IMPLICITARRYSTRUCTVAR errors that occasionally crop up are caused by bugs in CF, not bugs in your code. They've been lurking around in various manifestations (there's a number of bugs that cause this sort of thing) since CF9 as far as I can tell. But they might occur in CF8 too.
Here're some example bugs:
https://bugbase.adobe.com/index.cfm?event=bug&id=3040282
https://bugbase.adobe.com/index.cfm?event=bug&id=3148699
https://bugbase.adobe.com/index.cfm?event=bug&id=3043734
https://bugbase.adobe.com/index.cfm?event=bug&id=3043459
--
Adam