From 458bf55b6ec0e897e943454d8487400394576270 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 7 Apr 2016 16:19:44 +0200 Subject: * fixing (de)serialization issues of SQL client in a facade instance --- app/php/facades/Facade.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3