Index: openacs-4/packages/acs-templating/tcl/tag-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/tag-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-templating/tcl/tag-procs.tcl 31 Jan 2005 21:03:19 -0000 1.10 +++ openacs-4/packages/acs-templating/tcl/tag-procs.tcl 2 Feb 2005 21:32:28 -0000 1.11 @@ -161,18 +161,22 @@ append condition "\[empty_string_p $arg1\]" } else { # substitute array variables - regsub {^"@([a-zA-Z0-9_]+)\.([a-zA-Z0-9_.]+)@"$} $arg1 {\1(\2)} arg1 - # substitute regular variables - regsub {^"@([a-zA-Z0-9_:]+)@"$} $arg1 {\1} arg1 + if {! ( [regsub {^"@([a-zA-Z0-9_]+)\.([a-zA-Z0-9_.]+)@"$} $arg1 {\1(\2)} arg1] + || [regsub {^"@([a-zA-Z0-9_:]+)@"$} $arg1 {\1} arg1] ) } { + error "IF tag nil test uses string not variable for $arg1" + } append condition "\[template::util::is_nil $arg1\]" } set next $i } defined { # substitute variable references - regsub {^"@([a-zA-Z0-9_]+)\.([a-zA-Z0-9_.]+)@"$} $arg1 {\1(\2)} arg1 - regsub {^"@([a-zA-Z0-9_:]+)@"$} $arg1 {\1} arg1 + if { ! ( [regsub {^"@([a-zA-Z0-9_]+)\.([a-zA-Z0-9_.]+)@"$} $arg1 {\1(\2)} arg1] + || [regsub {^"@([a-zA-Z0-9_:]+)@"$} $arg1 {\1} arg1] )} { + error "IF tag defined test uses string not variable for $arg1" + } + append condition "\[info exists $arg1\]" set next $i }