Doc #65567 [Fbk->NoF]: Documentation does not match thrown error
Edit report at https://bugs.php.net/bug.php?id=65567&edit=1
ID: 65567
Updated by: php-bugs@lists.php.net
Reported by: gavinromberger at yahoo dot com
Summary: Documentation does not match thrown error
-Status: Feedback
+Status: No Feedback
Type: Documentation Problem
Package: APC
Operating System: Mac OSX 10.8
PHP Version: 5.5Git-2013-08-27 (Git)
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2013-09-11 21:45:01] aharvey@php.net
Are you running APC or APCu? I can't see any way you'd get that error out of APC
proper, but it looks like APCu does change the parameters for
APCIterator::__construct() in some circumstances:
https://github.com/krakjoe/apcu/blob/simplify/apc_iterator.c#L321-L329
------------------------------------------------------------------------
[2013-08-27 23:16:55] gavinromberger at yahoo dot com
Description:
------------
when running this line of code
new APCIterator('user', '/^Attributes__/', APC_ITER_KEY);
I get this error -
Uncaught exception 'ErrorException' with message 'APCIterator::__construct()
expects parameter 2 to be long, string given'
This is what the documentation states concerning the constructor params -
public APCIterator::__construct ( string $cache [, mixed $search = null [, int
$format [, int $chunk_size = 100 [, int $list ]]]] )
Specifically for the $search param (param 2) the documentation states -
A PCRE regular expression that matches against APC key names, either as a string
for a single regular expression, or as an array of regular expressions. Or,
optionally pass in NULL to skip the search.
Test script:
---------------
new APCIterator('user', $search, APC_ITER_KEY);
Expected result:
----------------
I expect to get back an APCIterator object
Actual result:
--------------
fatal error
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65567&edit=1
Thread (4 messages)