|  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
 [2015-01-21 06:51 UTC] bugreports at internot dot info

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);



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-21 18:09 UTC]
-Status: Open +Status: Not a bug
 [2015-01-21 18:09 UTC]
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: Tue Jul 16 06:01:29 2024 UTC