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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user