#45088 [Opn->Csd]: Example #1 for PDO->sqliteCreateAggregate() doesn't work
| From: | vrana@php.net | Date: | Wed, 05 Nov 2008 16:45:38 +0000 |
| Subject: | #45088 [Opn->Csd]: Example #1 for PDO->sqliteCreateAggregate() doesn't work | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-1376@lists.php.net to get a copy of this message | ||
ID: 45088
Updated by: vrana@php.net
Reported By: rogutes at gmail dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2008-05-25 18:12:13] rogutes at gmail dot com
Description:
------------
It seems that PDO->sqliteCreateAggregate() (or at least Example #1)
isn't working as documented .
Documentation and Example #1 talks against using a copy of $context,
but this function from the example doesn't work, unless you return
$context:
function max_len_step(&$context, $rownumber, $string)
{
if (strlen($string) > $context) {
$context = strlen($string);
}
}
Reproduce code:
---------------
The code block from Example #1
Expected result:
----------------
array(1) {
[0]=>
array(2) {
["max_len(a)"]=>
string(1) "5"
[0]=>
string(1) "5"
}
}
Actual result:
--------------
array(1) {
[0]=>
array(2) {
["max_len(a)"]=>
NULL
[0]=>
NULL
}
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45088&edit=1