Show
Ignore:
Timestamp:
08/19/04 10:22:51 (4 years ago)
Author:
schst
Message:

fixed bug with conditions and '0' as variable value

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/patTemplate.php

    r267 r268  
    16681668                        $this->_fetchVariables($var[0]); 
    16691669                         
    1670                     if( isset( $this->_templates[$var[0]]['vars'][$var[1]] ) && !empty( $this->_templates[$var[0]]['vars'][$var[1]] )
     1670                    if( isset( $this->_templates[$var[0]]['vars'][$var[1]] ) && strlen( $this->_templates[$var[0]]['vars'][$var[1]] ) > 0
    16711671                        continue; 
    16721672 
     
    17401740             * get the value from the template variables 
    17411741             */ 
    1742             if( !isset( $this->_templates[$_template]['vars'][$value] ) || empty( $this->_templates[$_template]['vars'][$value] )
     1742            if( !isset( $this->_templates[$_template]['vars'][$value] ) || strlen( $this->_templates[$_template]['vars'][$value] ) === 0
    17431743            { 
    17441744                if( $this->_templates[$template]['attributes']['useglobals'] == 'yes' || $this->_templates[$template]['attributes']['useglobals'] == 'useglobals' ) 
    17451745                { 
    1746                     if( isset( $this->_globals[$value] ) && !empty( $this->_globals[$value] )
     1746                    if( isset( $this->_globals[$value] ) && strlen( $this->_globals[$value] ) > 0
    17471747                    { 
    17481748                        $value = $this->_globals[$value];