Check numeric values against null via !== null. Fixes cases where a cellpadding or width of 0 will not be output because if(value) was false.

This commit is contained in:
Chris Morgan
2007-10-20 18:31:29 -04:00
parent b074048c57
commit 7a1d3efb1c

View File

@@ -425,16 +425,16 @@ class Table
if($this->sWidth)
$sStr.= ' width="'.$this->sWidth.'"';
if($this->iBorder)
if($this->iBorder !== null)
$sStr.= ' border="'.$this->iBorder.'"';
if($this->sAlign)
$sStr.= ' align="'.$this->sAlign.'"';
if($this->iCellSpacing)
if($this->iCellSpacing !== null)
$sStr.= ' cellspacing="'.$this->iCellSpacing.'"';
if($this->iCellPadding)
if($this->iCellPadding !== null)
$sStr.= ' cellpadding="'.$this->iCellPadding.'"';
$sStr.= ">"; // close the open table element