Share

PROPS - News Publishing Platform

Tracker: Bugs

5 Tag return values that equate to false aren't handled - ID: 2001726
Last Update: Tracker Item Submitted ( greenie2600 )

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 ).


Travis Miller ( greenie2600 ) - 2008-06-24 12:52

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.