From 7a1d3efb1cc9b0a596f54cbf2cf1592d514c940a Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Sat, 20 Oct 2007 18:31:29 -0400 Subject: [PATCH] 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. --- include/table.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/table.php b/include/table.php index 7dfc4b1..07c42bd 100644 --- a/include/table.php +++ b/include/table.php @@ -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