php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68870 Incorrect enum
Submitted: 2015-01-21 06:51 UTC Modified: 2015-01-21 18:09 UTC
From: bugreports at internot dot info Assigned:
Status: Not a bug Package: PDO related
PHP Version: master-Git-2015-01-21 (Git) OS: Linux Ubuntu 14.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bugreports at internot dot info
New email:
PHP Version: OS:

 

 [2015-01-21 06:51 UTC] bugreports at internot dot info
Description:
------------
Hi,

In /ext/pdo/pdo_dbh.c:

Enum type for lval is established as enum pdo_case_conversion here
710                                        dbh->desired_case = Z_LVAL_P(value);


But then:
Mixing enum types enum pdo_case_conversion and enum pdo_fetch_type for lval
742                        dbh->default_fetch_type = Z_LVAL_P(value);


Thanks,


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-21 18:09 UTC] aharvey@php.net
-Status: Open +Status: Not a bug
 [2015-01-21 18:09 UTC] aharvey@php.net
That's fine: Z_LVAL_P always returns a long, and in this case (setting attributes via PDO::setAttribute()) we want to interpret those long values as different enum values depending on the attribute that's being set.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 09:01:29 2024 UTC