php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74144 Unexpected output of getAttribute
Submitted: 2017-02-22 00:57 UTC Modified: 2017-02-22 07:13 UTC
From: wriver4 at gmail dot com Assigned:
Status: Not a bug Package: PDO related
PHP Version: Irrelevant OS: irrevelent
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wriver4 at gmail dot com
New email:
PHP Version: OS:

 

 [2017-02-22 00:57 UTC] wriver4 at gmail dot com
Description:
------------
So this was an accident in typing that produced an informative but unexpected result.

Test script:
---------------
    $db = new PDO("mysql:host=localhost;dbname=classicmodels;port=3306;charset=utf8",$user, $password);
    $db->setAttribute(PDO::ATTR_PERSISTENT, TRUE);
    $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, TRUE);
    $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
    $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, FALSE);
    $db->setAttribute(PDO :: ATTR_CASE, PDO :: CASE_NATURAL);
}

echo $db->getAttribute(PDO::PARAM_BOOL).'<br>';

Actual result:
--------------
mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-22 07:13 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2017-02-22 07:13 UTC] requinix@php.net
PARAM_BOOL and ATTR_CLIENT_VERSION both have a value of 5.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 18:01:31 2024 UTC