Strange Events with variables

Set of checkboxes (multiple binary) which produce an array. I tried to use Implode in my ajax click function for the checkboxes which would not turn my array into a string, so I used json_encode which works nicely. Then I use array_sum and it gives me the value of the field (“1,2,4” array then gives me 7 with array_sum). I echo back the value…7…all good. I now have a session variable [make] echoing the value.

I click my RUN button and in onvalidate I have it once again echo the value of [make] and it shows ARRAY. No…it’s not. It was set to an integer and echos back perfectly when set. Mystery #1.

So I added an integer field “fakemake.” After I set [make] I have {fakemake}=[make]. Then I turn it back into [make] in the onvalidate to use in my link and all is well again. BUT…if I have {fakemake} as a field not shown, it doesn’t assign the value. So I have it shown in a block and mark it hidden. All good. Mystery #2

I’m on PHP 7.4.6. My applications have array checkboxes all over the place and I have NEVER had an issue with session variables carrying the values until recently. I don’t know what to think. I can make it work but sure am jumping through a lot of hoops.