PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

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.