diff options
author | emkael <emkael@tlen.pl> | 2016-04-07 16:19:44 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-04-07 17:05:35 +0200 |
commit | 458bf55b6ec0e897e943454d8487400394576270 (patch) | |
tree | 5340a51540a6808885d66e11e88c888560e2ced7 /app | |
parent | d42b25cbf6d3f1e51cb2a3149f1ff54cc5474bc9 (diff) |
* fixing (de)serialization issues of SQL client in a facade instance
Diffstat (limited to 'app')
-rw-r--r-- | app/php/facades/Facade.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/php/facades/Facade.php b/app/php/facades/Facade.php index d63d22a..9fc2c88 100644 --- a/app/php/facades/Facade.php +++ b/app/php/facades/Facade.php @@ -9,7 +9,11 @@ class Facade { protected $_sqlMap; protected function __construct() { - $this->_sqlMap = Prado::getApplication()->getModule('sqlmap')->Client; + } + + public function __sleep() { + $this->_sqlMap = NULL; + return array(); } public static function getInstance() { @@ -21,6 +25,9 @@ class Facade { } protected function getClient() { + if (!$this->_sqlMap) { + $this->_sqlMap = Prado::getApplication()->getModule('sqlmap')->Client; + } return $this->_sqlMap; } |