If a tag returns a value that casts to false in a boolean context (such as
the string "0"), template_exec_tag() in lib/templates.php returns the tag's
altoutput instead.
I'm working on a module to import and display AccuWeather forecast data,
and there are cases where tags need to return "0" (windspeed, temperature,
etc.). As a workaround, I've appended a single character of whitespace at
the end of the tag's return value, but I can imagine cases where this would
be problematic.
template_exec_tag() should only use altoutput if ( $output === '' ||
$output === false ).
Nobody/Anonymous
None
None
Public
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use