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

Cache: better fix for #5860 introduced in #5863 #7039

Merged
merged 2 commits into from
Jan 1, 2015
Merged

Cache: better fix for #5860 introduced in #5863 #7039

merged 2 commits into from
Jan 1, 2015

Conversation

marc-mabe
Copy link
Member

Cache: better fix for #5860 introduced in #5863

@Ocramius Ocramius added this to the 2.4.0 milestone Dec 16, 2014
@@ -597,7 +597,7 @@ public function setObjectKey($objectKey)
*/
public function getObjectKey()
{
if (!$this->objectKey) {
if ($this->objectKey === null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a logic change here: is there a test differentiating false and null?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setter setObjectKey allows only string and NULL but thinking more of it you are right as of before an empty string or "0" was handled the same as NULL. So I think "0" should be a valid key but an empty string should not be allowed by setter.
-> I'll update the PR and add a test case for it

@marc-mabe
Copy link
Member Author

@Ocramius test is available now

@Ocramius
Copy link
Member

Thanks @marc-mabe!

Ocramius added a commit that referenced this pull request Jan 1, 2015
@Ocramius Ocramius merged commit 860bef2 into zendframework:develop Jan 1, 2015
@Ocramius
Copy link
Member

Ocramius commented Jan 1, 2015

Merged, thanks @marc-mabe!

gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
…ernOptions::setObjectKey works as expected
gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants