sendXtMessage raw string null error

You think you've found a bug? Please report it here.

Moderators: Lapo, Bax

Post Reply
vazor
Posts: 31
Joined: 14 Jan 2009, 23:09
Location: USA
Contact:

sendXtMessage raw string null error

Post by vazor »

When you have a null value in your array for the STR message format, instead of getting empty string or "null" as expected, SmartFoxClient throws a null error:
paramObj.toString()
The code might be better to do a cast instead of calling the function:
String(paramObj)
or just leave it off completely since it will be converted to a string anyway.

However I guess I see the advantage in leaving it this way because "null" isn't exactly an expected value either. Best to let the coder know they are doing something silly by putting null. I have worked around this by checking for null and using empty string instead.
-vazor
Post Reply