Bug #68870 [Opn->Nab]: Incorrect enum
Edit report at https://bugs.php.net/bug.php?id=68870&edit=1
ID: 68870
Updated by: aharvey@php.net
Reported by: bugreports at internot dot info
Summary: Incorrect enum
-Status: Open
+Status: Not a bug
Type: Bug
Package: PDO related
Operating System: Linux Ubuntu 14.04
PHP Version: master-Git-2015-01-21 (Git)
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2015-01-21 06:51:54] 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,
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68870&edit=1
Thread (2 messages)