ID:               50458
 Updated by:       pierr...@php.net
 Reported By:      m dot kurzyna at crystalpoint dot pl
-Status:           Open
+Status:           Closed
 Bug Type:         PDO related
 Operating System: Linux
 PHP Version:      5.3.1
 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2009-12-14 03:44:33] s...@php.net

Automatic comment from SVN on behalf of pierrick
Revision: http://svn.php.net/viewvc/?view=revision&revision=292107
Log: - Fixed bug #50458 (PDO::FETCH_FUNC fails with Closures)

------------------------------------------------------------------------

[2009-12-12 13:01:34] m dot kurzyna at crystalpoint dot pl

Description:
------------
PDOStatement::fetchAll(PDO::FETCH_FUNC,function() {}) fails not being
able to recognize Closure as valid callback.

Reproduce code:
---------------
<?php
 $db = new PDO('sqlite::memory:');
 $db->exec('CREATE TABLE `a` ( `id` INTEGER )');

 $st = $db->query('SELECT * FROM `a`');
 $st->fetchAll(PDO::FETCH_FUNC,function() {});
?>


Expected result:
----------------
No error

Actual result:
--------------
Warning: PDOStatement::fetchAll() [pdostatement.fetchall]:
SQLSTATE[HY000]: General error: user-supplied function must be a valid
callback in ... on line 6


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50458&edit=1

Reply via email to