From 411fbb72f5a4c72e43af08ee403c79c73eb4b53f Mon Sep 17 00:00:00 2001 From: knut <> Date: Wed, 30 Jul 2008 01:43:12 +0000 Subject: fixed #890 --- framework/Data/SqlMap/TSqlMapConfig.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'framework/Data/SqlMap') 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 -- cgit v1.2.3