php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68727 apc.php invalid array key (from APCu)
Submitted: 2015-01-03 01:10 UTC Modified: 2015-11-22 05:04 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: kgustine at gmail dot com Assigned: krakjoe (profile)
Status: Closed Package: *General Issues
PHP Version: 5.5.20 OS: Windows 7 Pro
Private report: No CVE-ID: None
 [2015-01-03 01:10 UTC] kgustine at gmail dot com
Description:
------------
Using apc.php out of the latest version 4.0.7

Inserted a single value and went to look at the 'User Cache Entries' page, which generated the following errors:

[02-Jan-2015 18:51:05 America/Chicago] PHP Notice:  Undefined index: key in C:\wamp\www\apc.php on line 1045
[02-Jan-2015 18:51:05 America/Chicago] PHP Stack trace:
[02-Jan-2015 18:51:05 America/Chicago] PHP   1. {main}() C:\wamp\www\apc.php:0


There is no array value named 'key' in the $entry array, as seen on the printed array below

Ln  918: $fieldkey='key';
Ln 1044: echo '[<a href="', $MY_SELF, '&OB=', $MYREQUEST['OB'], '&DU=', urlencode($entry[$fieldkey]), '">Delete Now</a>]';

Array
(
    [info] => headers47
    [ttl] => 0
    [num_hits] => 0
    [modification_time] => 1420246095
    [creation_time] => 1420246095
    [deletion_time] => 0
    [access_time] => 1420246095
    [ref_count] => 0
    [mem_size] => 5808
)

I changed Ln 918 to "$fieldkey='info';". The page was then displayed correctly and I was able to delete individual elements.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-03 01:18 UTC] kgustine at gmail dot com
-Summary: apc.php invalid array key +Summary: apc.php invalid array key (from ACPu) -Package: Arrays related +Package: *General Issues
 [2015-01-03 01:18 UTC] kgustine at gmail dot com
This is from the PECL package APCu v4.0.7
 [2015-01-03 01:22 UTC] requinix@php.net
-Summary: apc.php invalid array key (from ACPu) +Summary: apc.php invalid array key (from APCu) -Assigned To: +Assigned To: krakjoe
 [2015-11-22 05:04 UTC] krakjoe@php.net
-Status: Assigned +Status: Closed
 [2015-11-22 05:04 UTC] krakjoe@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC