Miklos Tirpak writes:
Both of them would return false. Btw, I do not think that empty value is allowed for to tag, it's a very rare case, and could be covered with some explicit check.
to me to tag was just an example of some variable.
We used to write this, but had lots of issues. The problem happens for example with @contact.uri.user, when there is no contact header. Unfortunately the select function can return and error instead of success with "" value in this case. (The can be also revisited) And 'if (@contact.uri.user == "")' would evaluate to false because the left had side value does not exist, which is wrong.
this is exactly my point. you have to first check if something exists before you start to compare its value to something.
-- juha