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 (profile)
Status: Closed Package: PDO related
PHP Version: 5.3.15 OS: Windows 7
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
40 + 43 = ?
Subscribe to this entry?

 
 [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

Pull Requests

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())
 [2014-10-07 23:23 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=53c8612fe780a80fde64da118587e6096b16b595
Log: Fixed bug #62685 (Wrong return datatype in PDO::inTransaction())
 [2014-10-07 23:23 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=cd896d69d90c70fd13efec315fd8b1f6647497b9
Log: Fixed bug #62685 (Wrong return datatype in PDO::inTransaction())
 [2014-10-07 23:34 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=53c8612fe780a80fde64da118587e6096b16b595
Log: Fixed bug #62685 (Wrong return datatype in PDO::inTransaction())
 [2014-10-07 23:34 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=cd896d69d90c70fd13efec315fd8b1f6647497b9
Log: Fixed bug #62685 (Wrong return datatype in PDO::inTransaction())
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 01:01:27 2024 UTC