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

doContains bars us to store 0 (zero) #81

Open
kaczenski opened this issue Sep 21, 2016 · 2 comments
Open

doContains bars us to store 0 (zero) #81

kaczenski opened this issue Sep 21, 2016 · 2 comments

Comments

@kaczenski
Copy link

    /**
     * {@inheritdoc}
     */
    protected function doContains($id)
    {
        return (bool) $this->memcache->get($this->prefix.$id);
    }

The boolean cast bars us to store data that is casted to false. We checked it is possible to save and fetch data like 0 (ZERO). But the doContains() method make us believe it is not saved.

@mevdschee
Copy link
Contributor

It should either be "!==null" or "!==false" (I would have to consult the extension). Maybe you can do a PR?

@mevdschee
Copy link
Contributor

Fixed in mevdschee/TqdMemcacheBundle@a7d9765

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants