More stringent check for enabling, removed superfluous die
This commit is contained in:
parent
2a520427bf
commit
7a6089b79a
@ -34,7 +34,7 @@ if (@$_SESSION['USERDATA']['is_admin'] && $user->isAdmin(@$_SESSION['USERDATA'][
|
||||
}
|
||||
if (class_exists('Memcached')) {
|
||||
$memcache_test = @new Memcached();
|
||||
if ($config['memcache']['sasl']) {
|
||||
if ($config['memcache']['sasl'] === true) {
|
||||
$memcache_test->setOption(Memcached::OPT_BINARY_PROTOCOL, true);
|
||||
$memcache_test->setSaslAuthData($config['memcache']['sasl']['username'], $config['memcache']['sasl']['password']);
|
||||
}
|
||||
|
||||
@ -19,9 +19,9 @@ class StatsCache {
|
||||
require_once(CLASS_DIR . '/memcached.class.php');
|
||||
}
|
||||
$this->cache = new Memcached();
|
||||
if ($config['memcache']['sasl']) {
|
||||
if ($config['memcache']['sasl'] === true) {
|
||||
$this->cache->setOption(Memcached::OPT_BINARY_PROTOCOL, true);
|
||||
$this->cache->setSaslAuthData($config['memcache']['sasl']['username'], $config['memcache']['sasl']['password']) or die("failed!");
|
||||
$this->cache->setSaslAuthData($config['memcache']['sasl']['username'], $config['memcache']['sasl']['password']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user