merged branch tammyd/bugfix/memcache-port-0 (PR #6529)

This PR was merged into the 2.1 branch.

Commits
-------

c282a2b [DoctrineBridge] Allowing memcache port to be 0 to support memcache unix domain sockets.

Discussion
----------

[DoctrineBridge] Allowing memcache port to be 0 to support memcache unix domain sockets.

[DoctrineBridge] Allowing memcache port to be 0 to support memcache unix domain sockets.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Fixes the following tickets: #6527
Todo: -
License of the code: MIT
Documentation PR: ~
This commit is contained in:
Fabien Potencier 2013-01-02 10:33:53 +01:00
commit 36627c4c3c
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ abstract class AbstractDoctrineExtension extends Extension
$memcacheClass = !empty($cacheDriver['class']) ? $cacheDriver['class'] : '%'.$this->getObjectManagerElementName('cache.memcache.class').'%';
$memcacheInstanceClass = !empty($cacheDriver['instance_class']) ? $cacheDriver['instance_class'] : '%'.$this->getObjectManagerElementName('cache.memcache_instance.class').'%';
$memcacheHost = !empty($cacheDriver['host']) ? $cacheDriver['host'] : '%'.$this->getObjectManagerElementName('cache.memcache_host').'%';
$memcachePort = !empty($cacheDriver['port']) ? $cacheDriver['port'] : '%'.$this->getObjectManagerElementName('cache.memcache_port').'%';
$memcachePort = !empty($cacheDriver['port']) || (isset($cacheDriver['port']) && $cacheDriver['port'] === 0) ? $cacheDriver['port'] : '%'.$this->getObjectManagerElementName('cache.memcache_port').'%';
$cacheDef = new Definition($memcacheClass);
$memcacheInstance = new Definition($memcacheInstanceClass);
$memcacheInstance->addMethodCall('connect', array(