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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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: Thu Dec 26 18:01:31 2024 UTC