From:             voidalan at koitech dot net
Operating system: CentOS 5
PHP version:      5.2.4
PHP Bug Type:     PDO related
Bug description:  PDO::FETCH_CLASS incorrectly returns PDO::FETCH_BOTH

Description:
------------
When using PDO::FETCH_CLASS it incorrectly returns PDO::FETCH_BOTH. In
other words instead of returning objects it is returning a mixed array.

The below code worked in 5.2.3 but when upgrading to 5.2.4 this occured.

Reproduce code:
---------------
http://pastemonkey.org/paste/470883a5-8d1c-4256-a59d-27b2404fdb0d

Expected result:
----------------
Array(
  [0] => Object(
    id =>
    hidden =>
    featured =>
    title =>
    clientName =>
    teaser =>
    content =>
    imgUrl =>
    publishedBy =>
    dateCreated =>
    dateModified =>
  )
 ...
)

Actual result:
--------------
Array
(
    [0] => Array
        (
            [id] => 
            [0] => 
            [hidden] => 
            [1] => 
            [featured] => 
            [2] =>
            [title] => 
            [3] => 
            [clientName] => 
            [4] => 
            [teaser] => 
            [5] => 
            [content] =>  
            [6] => 
            [imgUrl] => 
            [7] => 
            [publishedBy] => 
            [8] => 
            [dateCreated] => 
            [9] => 
            [dateModified] => 
            [10] => 
        )
  ...
)

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

Reply via email to