#45088 [NEW]: Example #1 for PDO->sqliteCreateAggregate() doesn't work

From: Date: Sun, 25 May 2008 18:12:14 +0000
Subject: #45088 [NEW]: Example #1 for PDO->sqliteCreateAggregate() doesn't work
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-848@lists.php.net to get a copy of this message
From: rogutes at gmail dot com Operating system: PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: Example #1 for PDO->sqliteCreateAggregate() doesn't work 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 bug report at http://bugs.php.net/?id=45088&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45088&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45088&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45088&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45088&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45088&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45088&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45088&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45088&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45088&r=support Expected behavior: http://bugs.php.net/fix.php?id=45088&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45088&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45088&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45088&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45088&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45088&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45088&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45088&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45088&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45088&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45088&r=mysqlcfg

« previous php.doc.bugs (#848) next »