Skip to content

Commit

Permalink
Better sasl detection in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jan 3, 2015
1 parent 684a32d commit 97c2cd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Cache/Engine/MemcachedEngine.php
Expand Up @@ -159,7 +159,8 @@ public function init(array $config = [])
}

if ($this->_config['username'] !== null && $this->_config['password'] !== null) {
if (!method_exists($this->_Memcached, 'setSaslAuthData')) {
$sasl = method_exists($this->_Memcached, 'setSaslAuthData') && ini_get('memcached.use_sasl');
if (!$sasl) {
throw new InvalidArgumentException(
'Memcached extension is not build with SASL support'
);
Expand Down

0 comments on commit 97c2cd5

Please sign in to comment.