summaryrefslogtreecommitdiff
path: root/framework/Data
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data')
-rw-r--r--framework/Data/TDataSourceConfig.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/framework/Data/TDataSourceConfig.php b/framework/Data/TDataSourceConfig.php
index 93857b16..df444e97 100644
--- a/framework/Data/TDataSourceConfig.php
+++ b/framework/Data/TDataSourceConfig.php
@@ -10,6 +10,8 @@
* @package System.Data
*/
+Prado::using('System.Data.TDbConnection');
+
/**
* TDataSourceConfig module class provides <module> configuration for database connections.
*
@@ -46,7 +48,7 @@
*/
class TDataSourceConfig extends TModule
{
- private $_connID;
+ private $_connID='';
private $_conn;
private $_connClass='System.Data.TDbConnection';
@@ -91,9 +93,9 @@ class TDataSourceConfig extends TModule
*/
public function getDbConnection()
{
- if(is_null($this->_conn))
+ if($this->_conn===null)
{
- if(!is_null($this->_connID))
+ if($this->_connID!=='')
$this->_conn = $this->findConnectionByID($this->getConnectionID());
else
$this->_conn = Prado::createComponent($this->getConnectionClass());