Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Redis::setItems - the last item is overwritten #6324

Closed
wumch opened this issue May 25, 2014 · 3 comments
Closed

Redis::setItems - the last item is overwritten #6324

wumch opened this issue May 25, 2014 · 3 comments
Assignees
Milestone

Comments

@wumch
Copy link

wumch commented May 25, 2014

In this case:

$keyValuePairs = array('lastButOne' => 'valueOfLastButOne', 'last' => 'valueOfLast');
Zend\Cache\Storage\Adapter\Redis::setItems($keyValuePairs);  

what will be written is actually:

$keyValuePairs = array('lastButOne' => 'valueOfLastButOne', 'last' => 'valueOfLastButOne' /* the last value will be overwritten to the last but one's. */ );

This is caused by line 256 and 267 of Zend/Cache/Storage/Adapter/Redis.php,
reference "&$value" defined at line 256 is overwritten by variable "$value" defined at line 267.

@wumch wumch changed the title Redis setItems - the last item will be overwritten Redis::setItems - the last item is overwritten May 25, 2014
@adamlundrigan
Copy link
Contributor

This is fixed in open PR #6575

Ocramius added a commit that referenced this issue Nov 22, 2014
@Ocramius Ocramius self-assigned this Nov 22, 2014
@Ocramius Ocramius added this to the 2.3.4 milestone Nov 22, 2014
@Ocramius
Copy link
Member

Handled in #6575

gianarb pushed a commit to zendframework/zend-cache that referenced this issue May 15, 2015
gianarb pushed a commit to zendframework/zend-cache that referenced this issue May 15, 2015
gianarb pushed a commit to zendframework/zend-cache that referenced this issue May 15, 2015
boesing pushed a commit to laminas/laminas-cache-storage-adapter-test that referenced this issue May 24, 2020
boesing pushed a commit to laminas/laminas-cache-storage-adapter-test that referenced this issue May 24, 2020
boesing pushed a commit to laminas/laminas-cache-storage-adapter-apc that referenced this issue May 24, 2020
boesing pushed a commit to laminas/laminas-cache-storage-adapter-apc that referenced this issue May 24, 2020
boesing pushed a commit to laminas/laminas-cache-storage-adapter-redis that referenced this issue Jul 5, 2020
boesing pushed a commit to laminas/laminas-cache-storage-adapter-redis that referenced this issue Jul 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants