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

From: Date: Mon, 10 Nov 2014 11:35:20 +0000
Subject: Bug #68371 [Opn->Asn]: PDO#getAttribute() cannot be called with platform-specific attribute names
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188534@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:             Open
+Status:             Assigned
 Type:               Bug
 Package:            PDO related
 PHP Version:        5.6.2
-Assigned To:        
+Assigned To:        mbeccati
 Block user comment: N
 Private report:     N



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 (#188534) next »