php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72376 APCu: apcu_fetch fails on array with string references
Submitted: 2016-06-10 10:48 UTC Modified: 2018-02-11 20:35 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: martijn dot otto at copernica dot com Assigned: nikic (profile)
Status: Closed Package: APC (PECL)
PHP Version: 7.0.7 OS: ubuntu 16.04
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: martijn dot otto at copernica dot com
New email:
PHP Version: OS:

 

 [2016-06-10 10:48 UTC] martijn dot otto at copernica dot com
Description:
------------
When apcu_fetch is called with an array containing a reference to a string it fails with the following message:

Warning: apcu_fetch(): apc_fetch() expects a string or array of strings. in php shell code on line 1

Test script:
---------------
$keys = [ 'a', 'b' ];
array_walk($keys, function(&$item) {});
apcu_fetch($keys);

Expected result:
----------------
I expect to get an array with found keys and values.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-24 08:47 UTC] kalle@php.net
-Summary: apcu_fetch fails on array with string references +Summary: APCu: apcu_fetch fails on array with string references -Package: PECL +Package: APC
 [2018-02-11 20:35 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2018-02-11 20:35 UTC] nikic@php.net
This has been fixed by https://github.com/krakjoe/apcu/commit/e6735284b79897b2f81ef031211a796562e88270, part of apcu 5.1.9.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 20:01:36 2025 UTC