php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59475 memcache.php throws Notice: Undefined index: VALUE when viewing expired items
Submitted: 2010-10-25 19:09 UTC Modified: 2011-03-10 21:29 UTC
From: jake67890 at hotmail dot com Assigned:
Status: Closed Package: memcache (PECL)
PHP Version: 5.3.2 OS: any
Private report: No CVE-ID: None
 [2010-10-25 19:09 UTC] jake67890 at hotmail dot com
Description:
------------
PECL memcache extension - memcache.php throws PHP notices when 
viewing an item in the cache that has expired.

this may seem like a weird scenario but it happens frequently 
if you are working with objects that are only cached for a few 
seconds

Reproduce code:
---------------
To reproduce

1. add an item to the cache that has a quick expiration, for example 10 seconds.  

2. view that object in memcache.php.  

3. wait for the expiration and then refresh the page.


PATCH CODE: (insert at aprox line 851)

if (empty($r['VALUE']))
{
echo "<tr><td class=td-0>",$theserver,"</td><td class=td-0>",$theKey,
"</td><td>[The requested item was not found or has expired]</td>",
 "<td></td>","</tr>";
}
else
{
// echo the line normally
	        

Expected result:
----------------
if an expired item is clicked (or the details page refreshed) 
it should show that the item is expired or missing from the 
cache.

Actual result:
--------------
Notice: Undefined index: VALUE in memcache.php on line 860
Notice: Undefined index: VALUE in memcache.php on line 861
Notice: Undefined index: VALUE in memcache.php on line 862


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-10 21:29 UTC] hradtke@php.net
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 22:01:30 2024 UTC