This commit is contained in:
Roly Rudy Gutierrez Pinto
2016-09-09 11:09:02 -04:00
parent 82e48dd7e8
commit 6603cf1526
5 changed files with 50 additions and 27 deletions

View File

@@ -48,7 +48,7 @@ class PMmemcached
public function __construct ($workspace)
{
$this->enabled = MEMCACHED_ENABLED;
$this->enabled = defined("MEMCACHED_ENABLED") ? MEMCACHED_ENABLED : \G::$memcachedEnabled;
$this->connected = false;
$this->workspace = $workspace;
if (class_exists( 'Memcached' )) {
@@ -81,7 +81,7 @@ class PMmemcached
}
}
if (! MEMCACHED_ENABLED) {
if (!$this->enabled) {
$this->connected = false;
return false;
}