php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42813 Memcache->set($key, $value) changes $value FALSE to empty string
Submitted: 2007-10-01 10:53 UTC Modified: 2007-10-12 13:11 UTC
From: Sjon at react dot nl Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.4 OS: Linux 2.6.21.4
Private report: No CVE-ID: None
 [2007-10-01 10:53 UTC] Sjon at react dot nl
Description:
------------
Memcache->set($key, $value) changes $value and passes it back from the wrapping function

Reproduce code:
---------------
$m = new Memcache();
$m->addServer('127.0.0.1', 11211);

function s($k, $v)
{
        global $m;

        var_dump($v);
        $m->set($k, $v);
        var_dump($v);
}

$x = FALSE;
var_dump($x);
s('x', $x);
var_dump($x);

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


Actual result:
--------------
bool(false)
bool(false)
string(0) ""
string(0) ""

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-01 11:23 UTC] Sjon at react dot nl
Updated the title to be more specific
 [2007-10-01 11:25 UTC] pajoye@php.net
Please report bugs in: http://pecl.php.net/package/memcache > bug
 [2007-10-12 13:11 UTC] tony2001@php.net
This was fixed long time ago, update your PECL/memcache package.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 21 20:01:30 2024 UTC