Bug #68870 [Opn->Nab]: Incorrect enum

From: Date: Wed, 21 Jan 2015 18:09:46 +0000
Subject: Bug #68870 [Opn->Nab]: Incorrect enum
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190116@lists.php.net to get a copy of this message
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)

« previous php.bugs (#190116) next »