#44702 [Opn->Bgs]: PDO::FETCH_FUNC and namespaces
| From: | johannes@php.net | Date: | Thu, 06 Nov 2008 13:30:59 +0000 |
| Subject: | #44702 [Opn->Bgs]: PDO::FETCH_FUNC and namespaces | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-130704@lists.php.net to get a copy of this message | ||
ID: 44702
Updated by: johannes@php.net
Reported By: galactic dot void at googlemail dot com
-Status: Open
+Status: Bogus
Bug Type: PDO related
Operating System: *
PHP Version: 5.3CVS-2008-04-11 (snap)
New Comment:
This will be fixed with the new separator. Thanks for testing this
anyways!
Previous Comments:
------------------------------------------------------------------------
[2008-04-11 15:04:44] galactic dot void at googlemail dot com
Description:
------------
PDO::FETCH_FUNC does not work with functions and classes that are
inside a namespace.
Reproduce code:
---------------
namespace Foo;
function bar() { var_dump(func_get_args()); }
$pdo = new ::PDO();
$stmt = $pdo->query('SELECT * FROM foo_bar');
$stmt->fetchAll(PDO::FETCH_FUNC, 'Foo::bar');
Expected result:
----------------
array(2) {
[0]=>
string(4) "test"
[1]=>
string(4) "data"
}
Actual result:
--------------
Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error:
user-supplied class does not exist in /home/operations/Desktop/PHP.php
on line 8
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44702&edit=1