I noticed a bug in element procs:
ad_proc -private template::element::copy_value_to_values_if_defined {} {
define values from value, if the latter is more defined
} {
upvar opts opts
# values is always defined, init to "" from template::element::defaults
if { [info exists opts(value)] && [llength $opts(values)] == 0 } {
if { [string equal opts(value) {}] } {
set opts(values) [list]
} else {
set opts(values) [list $opts(value)]
}
}
}
Clearly it should be [string equal $opts(value) {}] (with the $) but 'fixing' this causes problems elsewhere. ad_form for example, doesn't declare variables that it exports as optional but when empty string is exported explicitly (as in acs-subsite/lib/user-new) ad_form would explode without the unintentional behaviour above. I didn't want to commit a fix to the code above when there are issues that people may not be aware of.