Skip to content

Commit

Permalink
[mms] Fix cloning the HashTable object when a prefix parameter is spe…
Browse files Browse the repository at this point in the history
…cified.
  • Loading branch information
slusarz committed Jan 27, 2014
1 parent 2f0225d commit 5e9026d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions framework/Cache/lib/Horde/Cache/Storage/Hashtable.php
Expand Up @@ -44,12 +44,6 @@ public function __construct(array $params = array())
throw new InvalidArgumentException('Missing hashtable parameter.');
}

if (isset($params['prefix'])) {
$params['hashtable'] = clone $params['hashtable'];
$params['hashtable']->prefix = $params['prefix'];
unset($params['prefix']);
}

parent::__construct($params);
}

Expand All @@ -58,6 +52,11 @@ public function __construct(array $params = array())
protected function _initOb()
{
$this->_hash = $this->_params['hashtable'];

if (isset($this->_params['prefix'])) {
$this->_hash = clone $this->_hash;
$this->_hash->prefix = $this->_params['prefix'];
}
}

/**
Expand Down
4 changes: 2 additions & 2 deletions framework/Cache/package.xml
Expand Up @@ -27,7 +27,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [mms] Fix cloning the HashTable object when a prefix parameter is specified.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -546,7 +546,7 @@ Initial packaging.
<date>2014-01-24</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [mms] Fix cloning the HashTable object when a prefix parameter is specified.
</notes>
</release>
</changelog>
Expand Down

0 comments on commit 5e9026d

Please sign in to comment.