php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72980 APCu: apcu_fetch() fails to return empty key value
Submitted: 2016-08-30 16:06 UTC Modified: 2018-10-09 19:52 UTC
From: vedad at kajtaz dot net Assigned: nikic (profile)
Status: Closed Package: APC (PECL)
PHP Version: 7.0.10 OS: FreeBSD 10.1
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: vedad at kajtaz dot net
New email:
PHP Version: OS:

 

 [2016-08-30 16:06 UTC] vedad at kajtaz dot net
Description:
------------
This bug report is related to the apcu 5.1.5 (the bug sumbittion form only provided 'APC' choice).

apcu_fetch('') fails to return empty string key value previously set with apcu_store('', ...). On the other hand, apcu_fetch(['']) does.

Test script:
---------------
echo apcu_store('', 'empty') ? 'stored' : 'not stored';
echo PHP_EOL;
var_export(apcu_fetch(''));
var_export(apcu_fetch(['']));


Expected result:
----------------
stored
'empty'
array (
  '' => 'empty',
)


Actual result:
--------------
stored
false
array (
  '' => 'empty',
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-18 20:57 UTC] kalle@php.net
-Summary: apcu_fetch() fails to return empty key value +Summary: APCu: apcu_fetch() fails to return empty key value
 [2018-10-09 19:52 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2018-10-09 19:52 UTC] nikic@php.net
Fixed by https://github.com/krakjoe/apcu/commit/719dfefd816084d92762715cb7da62bce6283e12, which will be part of apcu 5.1.13.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 02:01:30 2024 UTC