|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
16 - 6 = ?
Subscribe to this entry?

 [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: Mon May 27 00:01:31 2024 UTC