PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_Table » Bug #5781

function addCol is wrong

Details

Submitted2005-10-25 16:14 UTC
Fromtep at geotrax dot com
Assignedwiesemann
StatusClosed
PackageHTML_Table
PHP Version5.0.5
OSLinux
Roadmaps(Not assigned)

Comments

[2005-10-25 16:14 UTC] tep at geotrax dot com

Description:
------------
FYI: The latest release of HTML_Table 1.6 has the following
function defined. Note that you reference variables in the
internal call to updateRowAttributes that you are not
passing in.

/**
* Adds a table column and returns the column identifier
* @param array $contents (optional) Must be a
indexed array of valid cell contents
* @param mixed $attributes (optional) Associative
array or string of table row attributes
* @param string $type (optional) Cell type
either 'th' or 'td'
* @return int
* @access public
*/

function addCol($contents = null, $attributes = null, $type
= 'td')
{
return $this->_tbody->updateRowAttributes($row,
$attributes,
$inTR);
}

Not sure how this version got labeled as 'stable'

This causes the script to bomb when it gets to the internal
line with the undefined variables.

Test script:
---------------
Anything that calls this function

Expected result:
----------------
It generates a PHP error stating that the variables are not
defined.