Salut!
Mmmh. When I read you post, I remembered that Prof. Neumann applied a large-scale replacement of numeric comparison operators (==) to string-specific ones (eq, ne), due to the non-neglectable performance gain:
http://fisheye.openacs.org/browse/OpenACS/openacs-4/packages/forums/www/message-post.tcl?r1=1.37&r2=1.38
The issue is that a certain (=non-robust) expr statements turned renegade due to this. By non-robust, I mean that strings get variable etc. substituted before the expression is evaluated. In the concrete example above,
set forum_id 824
## fails: unexpected operator ||
set x [expr ($forum_id eq "" || 0)]
## correct:
set x [expr {($forum_id eq "" || 0)}]
so adding protecting curly braces solves the precedence issue between expression and string evaluation ...
I don't have the time to apply the fix rightnow, if nobody does, I will commit later ... probably other places need to be checked to?
//s