Bug #68371 [Asn->Csd]: PDO#getAttribute() cannot be called with platform-specific attribute names

From: Date: Mon, 05 Jan 2015 09:49:58 +0000
Subject: Bug #68371 [Asn->Csd]: PDO#getAttribute() cannot be called with platform-specific attribute names
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189657@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68371&edit=1

 ID:                 68371
 Updated by:         mbeccati@php.net
 Reported by:        ocramius at gmail dot com
 Summary:            PDO#getAttribute() cannot be called with
                     platform-specific attribute names
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            PDO related
 PHP Version:        5.6.2
 Assigned To:        mbeccati
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of mbeccati
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7d2f8525d8ec1612ad3999076e291e734fcb0568
Log: Fixed bug #68371 PDO#getAttribute() cannot be called with platform-specific attribute names


Previous Comments:
------------------------------------------------------------------------
[2014-11-07 09:11:38] ocramius at gmail dot com

Description:
------------
It is not possible to call PDO#getAttribute() with platform-specific attributes.

Reference: https://travis-ci.org/doctrine/dbal/jobs/40271810#L210
Related: https://bugs.php.net/bug.php?id=38182

Test script:
---------------
<?php

$pdo = new PDO('pgsql:host=localhost port=5432');

$pdo->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true);

var_dump($pdo->getAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES));

Expected result:
----------------
bool(true)

Actual result:
--------------
Fatal error: Uncaught exception 'PDOException' with message 'PDOException:
SQLSTATE[IM001]: Driver does not support this function: driver does not support that attribute'


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68371&edit=1


Thread (3 messages)

« previous php.bugs (#189657) next »