diff options
Diffstat (limited to 'framework/Data')
| -rw-r--r-- | framework/Data/ActiveRecord/TActiveRecordManager.php | 7 | ||||
| -rw-r--r-- | framework/Data/SqlMap/TSqlMapConfig.php | 12 | 
2 files changed, 11 insertions, 8 deletions
diff --git a/framework/Data/ActiveRecord/TActiveRecordManager.php b/framework/Data/ActiveRecord/TActiveRecordManager.php index 3790773d..a2f9a44f 100644 --- a/framework/Data/ActiveRecord/TActiveRecordManager.php +++ b/framework/Data/ActiveRecord/TActiveRecordManager.php @@ -1,4 +1,4 @@ -<?php +<?php
  /**
   * TActiveRecordManager class file.
   *
 @@ -93,8 +93,9 @@ class TActiveRecordManager extends TComponent  	 */
  	public function getRecordGateway()
  	{
 -		if(is_null($this->_gateway))
 +		if($this->_gateway === null) {
  			$this->_gateway = $this->createRecordGateway();
 +		}
  		return $this->_gateway;
  	}
 @@ -107,5 +108,5 @@ class TActiveRecordManager extends TComponent  	}
  }
 - +
  ?>
\ No newline at end of file diff --git a/framework/Data/SqlMap/TSqlMapConfig.php b/framework/Data/SqlMap/TSqlMapConfig.php index 5ee4de54..b51ac122 100644 --- a/framework/Data/SqlMap/TSqlMapConfig.php +++ b/framework/Data/SqlMap/TSqlMapConfig.php @@ -47,8 +47,9 @@ class TSqlMapConfig extends TDataSourceConfig  	public function clearCache()
  	{
  		$cache = $this->getApplication()->getCache();
 -		if(!is_null($cache))
 +		if($cache !== null) {
  			$cache->delete($this->getCacheKey());
 +		}	
  	}
  	/**
 @@ -60,8 +61,9 @@ class TSqlMapConfig extends TDataSourceConfig  		if($this->getEnableCache())
  		{
  			$cache = $this->getApplication()->getCache();
 -			if(!is_null($cache))
 +			if($cache !== null) {
  				return $cache->set($this->getCacheKey(), $manager);
 +			}
  		}
  		return false;
  	}
 @@ -75,7 +77,7 @@ class TSqlMapConfig extends TDataSourceConfig  		if($this->getEnableCache())
  		{
  			$cache = $this->getApplication()->getCache();
 -			if(!is_null($cache))
 +			if($cache !== null)
  			{
  				$manager = $cache->get($this->getCacheKey());
  				if($manager instanceof TSqlMapManager)
 @@ -104,7 +106,7 @@ class TSqlMapConfig extends TDataSourceConfig  		else
  		{
  			$file = Prado::getPathOfNamespace($value,self::CONFIG_FILE_EXT);
 -			if(is_null($file) || !is_file($file))
 +			if($file === null || !is_file($file))
  				throw new TConfigurationException('sqlmap_configfile_invalid',$value);
  			else
  				$this->_configFile = $file;
 @@ -159,5 +161,5 @@ class TSqlMapConfig extends TDataSourceConfig  		return $this->_sqlmap;
  	}
  }
 - +
  ?>
\ No newline at end of file  | 
