php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69809 memcache get always modify flag parameter
Submitted: 2015-06-12 09:50 UTC Modified: -
From: bburnichon at gmail dot com Assigned:
Status: Open Package: memcache (PECL)
PHP Version: 5.5.26 OS: Mac OS X
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-06-12 09:50 UTC] bburnichon at gmail dot com
Description:
------------
In an application I'm in charge of, some booleans are cached, The only way to know whether false returned is an actual hit is to check whether the flag value was changed.

It works perfectly on a vagrant debian 7 but not in native OSX installation.

memcache

memcache support => enabled
Active persistent connections => 0
Version => 2.2.7
Revision => $Revision: 327750 $

Directive => Local Value => Master Value
memcache.allow_failover => 1 => 1
memcache.chunk_size => 8192 => 8192
memcache.default_port => 11211 => 11211
memcache.default_timeout_ms => 1000 => 1000
memcache.hash_function => crc32 => crc32
memcache.hash_strategy => standard => standard
memcache.max_failover_attempts => 20 => 20


Test script:
---------------
$memcache = new Memcache();
$memcache->connect('localhost', 11211);
$memcache->flush();
$flag = null; var_dump($memcache->get('foo', $flag), $flag);


Expected result:
----------------
bool(false)
NULL

Actual result:
--------------
bool(false)
int(0)

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 03:01:25 2019 UTC