From:             robert dot allen at zircote dot com
Operating system: Windows XP
PHP version:      5.2.5
PHP Bug Type:     PDO related
Bug description:  When using FETCH_CLASS|CLASS_TYPE  'MyClass' an array of 
stdClass returned

Description:
------------
Windows XP / PHP 5.2.5 / PDO_ODBC

When setFetchMode is called with FETCH_CLASS and the Object type specified
the Object type is returned as stdClass in the array for fetchAll() however
for fetch() returns the expected result of the defined object.




Reproduce code:
---------------
$stmt->setFetchMode(PDO :: FETCH_CLASS | PDO :: FETCH_CLASSTYPE,
'MyClass');
$stmt->execute();
$all = $stmt->fetchAll();



Expected result:
----------------
return:
Array ( [0] => MyClass Object (.....

Actual result:
--------------
return:
Array ( [0] => stdClass Object (.....

-- 
Edit bug report at http://bugs.php.net/?id=44407&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44407&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44407&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44407&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44407&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44407&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44407&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44407&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44407&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44407&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44407&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44407&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44407&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44407&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44407&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44407&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44407&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44407&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44407&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44407&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44407&r=mysqlcfg

Reply via email to