php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60283 rollback would throw a PDOException and that's no documented
Submitted: 2011-11-13 08:25 UTC Modified: 2011-12-03 23:08 UTC
From: boaz dot rymland at gmail dot com Assigned: frozenfire (profile)
Status: Closed Package: PDO related
PHP Version: Irrelevant OS: RedHat
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: boaz dot rymland at gmail dot com
New email:
PHP Version: OS:

 

 [2011-11-13 08:25 UTC] boaz dot rymland at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/pdo.rollback#refsect1-pdo.rollback-
returnvalues
---

manual page on the php.net documentation should state that PDO::rollback would 
throw a PDOException on certain conditions, like if no transaction existed.
The current documentation on the site says that it will return true on success or 
false on problems, and vaguely states that "It is an error to call this method if 
no transaction is active". this is vague and doesn't explain that an exception 
will be thrown.
This caused an un-handled exception in my code since in the upmost catch block I 
did a rollback to make sure that any open transaction is rolled-back. that lead 
to an un-handled exception... :-(

Expected result:
----------------
state in the documentation this possible PDOExcetion throwing


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-13 08:26 UTC] boaz dot rymland at gmail dot com
-Summary: rollback would throw a PDOException +Summary: rollback would throw a PDOException and that's no documented
 [2011-11-13 08:26 UTC] boaz dot rymland at gmail dot com
updated bug title...
 [2011-12-03 23:08 UTC] frozenfire@php.net
Automatic comment from SVN on behalf of frozenfire
Revision: http://svn.php.net/viewvc/?view=revision&revision=320328
Log: Clarified that a PDOException is thrown if no transaction is active. Closes bug #60283.
 [2011-12-03 23:08 UTC] frozenfire@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: frozenfire
 [2011-12-03 23:08 UTC] frozenfire@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.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Dec 04 02:03:36 2021 UTC