php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62685 Wrong return datatype in PDO::inTransaction()
Submitted: 2012-07-28 20:35 UTC Modified: 2012-08-02 04:50 UTC
From: bgrauer at a2er dot ch Assigned: laruence
Status: Closed Package: PDO related
PHP Version: 5.3.15 OS: Windows 7
Private report: No CVE-ID:
 [2012-07-28 20:35 UTC] bgrauer at a2er dot ch
Description:
------------
PDO::inTransaction() returns integer instead of boolean values.

MySQL Version: 5.5.25a

Test script:
---------------
$pdo = new \PDO('mysql:dbname=testdb;host=127.0.0.1', 'testuser', '...');
var_dump($pdo->inTransaction());
$pdo->beginTransaction();
var_dump($pdo->inTransaction());
$pdo->commit();
var_dump($pdo->inTransaction());

Expected result:
----------------
boolean false
boolean true
boolean false

Actual result:
--------------
int 0
int 1
int 0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-02 04:50 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=cd896d69d90c70fd13efec315fd8b1f6647497b9
Log: Fixed bug #62685 (Wrong return datatype in PDO::inTransaction())
 [2012-08-02 04:50 UTC] laruence@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-08-02 04:50 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 [2012-08-02 04:53 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=53c8612fe780a80fde64da118587e6096b16b595
Log: Fixed bug #62685 (Wrong return datatype in PDO::inTransaction())
 [2012-08-02 04:53 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=cd896d69d90c70fd13efec315fd8b1f6647497b9
Log: Fixed bug #62685 (Wrong return datatype in PDO::inTransaction())
 [2012-08-02 04:53 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=53c8612fe780a80fde64da118587e6096b16b595
Log: Fixed bug #62685 (Wrong return datatype in PDO::inTransaction())
 [2012-08-02 04:53 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=cd896d69d90c70fd13efec315fd8b1f6647497b9
Log: Fixed bug #62685 (Wrong return datatype in PDO::inTransaction())
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 00:01:21 2014 UTC