I had a similar problem, which may be the same here. In my Servermethod, I was expecting several parameters that I all read as strings:
TServerMethods1.InsertMember(userid, Pw, MemberName, PhoneNumber: string): TJsonArray;
After some time, people complained that the phone number was not transmitted correctly, and the leading "0" was turned off. Therefore, somewhere in the process, he tries to evaluate the parameter to a type that he considers suitable! So for phonenumber '08979' he thinks it is a number, and my InsertMember function got the number 8979 as the phone number. I can imagine that in your case it was so! The solution was to not use the string type, but JSonType in parma. So I changed the interface to:
TServerMethods1.InsertMember(juserid, jPw, jMemberName, jPhoneNumber: TJSONString): TJsonArray;
But now the parameter is jsonobjects and requires special processing if someone left the parameter empty. For this, I used local variables. For each parameter I received, I performed the following check and copied it into a local variable:
if not assigned (jPhoneNumber), then PhoneNumber: = '' else PhoneNumber: = UpperCase (StringReplace (jPhoneNumber.ToString, '"', '', [rfReplaceAll]));
After that, everything worked. In your case, I think it converts t and f to a boolean, trying to make a number from a phone number! Since then I always use TJSonobjects.
source share