php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68371 PDO#getAttribute() cannot be called with platform-specific attribute names
Submitted: 2014-11-07 09:11 UTC Modified: 2014-11-10 11:35 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ocramius at gmail dot com Assigned: mbeccati (profile)
Status: Closed Package: PDO related
PHP Version: 5.6.2 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ocramius at gmail dot com
New email:
PHP Version: OS:

 

 [2014-11-07 09:11 UTC] 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'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-10 11:35 UTC] mbeccati@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: mbeccati
 [2015-01-05 09:49 UTC] mbeccati@php.net
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
 [2015-01-05 09:49 UTC] mbeccati@php.net
-Status: Assigned +Status: Closed
 [2015-01-05 09:50 UTC] mbeccati@php.net
Automatic comment on behalf of mbeccati
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3e4b91ec7f1278eec16ebdde579b10dc4893f500
Log: Fixed bug #68371 PDO#getAttribute() cannot be called with platform-specific attribute names
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 16:01:33 2024 UTC