PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB » Bug #7227

Wrong Parameter Count

Details

Submitted2006-03-28 17:54 UTC
Fromjwagoner at seminolesheriff dot org
Assignedlsmith
StatusClosed
PackageDB
PHP Version5.0.5
OSUbuntu
Roadmaps(Not assigned)

Comments

[2006-03-28 17:54 UTC] jwagoner at seminolesheriff dot org

Description:
------------
When using DB_mssql with fetch mode DB_FETCHMODE_OBJECT, the function fetchInto attempts to use mssql_fetch_array() with 2 parameters. In PHP 5, the second parameter was removed, and thus errors (which is caught by the @). I simply fixed it by removing the second parameter.

Test script:
---------------
$db = DB::connect('mssql://blah:blah@blah/blah');
$db->setFetchMode(DB_FETCHMODE_OBJECT);
$result = $db->query('SELECT * FROM blah');

Expected result:
----------------
The row's actual data.

Actual result:
--------------
The rows are NULL.