Chris Morgan : 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.
Module: appdb Branch: master Commit: 7a1d3efb1cc9b0a596f54cbf2cf1592d514c940a URL: http://source.winehq.org/git/appdb.git/?a=commit;h=7a1d3efb1cc9b0a596f54cbf2... Author: Chris Morgan <cmorgan(a)alum.wpi.edu> Date: Sat Oct 20 18:31:29 2007 -0400 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 files 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
participants (1)
-
Chris Morgan