|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #57384 False as Return Value breaks storing vars with value "false"
Submitted: 2006-11-20 08:42 UTC Modified: 2006-11-20 08:57 UTC
From: php at xaospage dot de Assigned:
Status: Not a bug Package: memcache (PECL)
PHP Version: 5.2.0 OS: Debian Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: php at xaospage dot de
New email:
PHP Version: OS:


 [2006-11-20 08:42 UTC] php at xaospage dot de
False as Return Value breaks storing vars with value "false"

If i want to save an value "false" into memcache, everything is fine.
If i want this value back(specified by id), an problem occurs:

false is also the returnvalue for Memcache::get, so i can't get the value because if I check for an false value, i can't differ if it is the value of my memcache id or a failure within memcache(FALSE on failure or if such key was not found.)
I would suggest to use failure codes for not in cache and for failure (eg -1 or -2 ).
But this will break BC..


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-20 08:45 UTC] php at xaospage dot de
changed Version from 5.20 RC4 (latest version beside CVS head in dropdownbox ) to 5.20
 [2006-11-20 08:57 UTC] tony2001 at phpclub dot net
Duplicate of FR #6367:
The reasons why it won't be changed are explained there.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 23:01:36 2024 UTC