PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Authentication » LiveUser_Admin » Bug #7213

PDO->fetchAll() Params in queryAll()

Details

Submitted2006-03-27 08:39 UTC
Frommarc dot jakubowski at gmail dot com
Assignedlsmith
StatusClosed
PackageLiveUser_Admin
PHP Version5.1.1
OSXP
Roadmaps(Not assigned)

Comments

[2006-03-27 08:39 UTC] marc dot jakubowski at gmail dot com

Description:
------------
When using PDO as storage and calling the get*() methods without parameters or with array('select' => 'all') to fetch all Groups, Rights etc the method queryAll() in Admin/Storage/PDO.php is called and
$stmt->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_COLUMN|PDO::FETCH_GROUP); is executed but it will only return the first columns as a numeric array instead of all columns in an associated array.

When removing the "|PDO::FETCH_COLUMN|PDO::FETCH_GROUP" part so that only PDO::FETCH_ASSOC is used, everything works fine.

Test script:
---------------
$admin->perm->getGroups();

Expected result:
----------------
array(2) {
[0] => array(3) {
["group_id"] => string(1) "1"
["group_type"] => string(1) "1"
["group_define_name"] => string(4) "Member"
}
[1] => array(3) {
["group_id"] => string(1) "2"
["group_type"] => string(1) "1"
["group_define_name"] => string(4) "Admin"
}
}

Actual result:
--------------
array(2) {
[1] => array(1) {
[0] => string(1) "1"
}
[2] => array(1) {
[0] => string(1) "1"
}
}