php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38319 PDO persistent connectrions still produce E_WARNING
Submitted: 2006-08-03 21:01 UTC Modified: 2006-12-04 03:09 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: peter at finalarena dot com Assigned:
Status: Closed Package: PDO related
PHP Version: 5.1.4 OS: RHEL3
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: peter at finalarena dot com
New email:
PHP Version: OS:

 

 [2006-08-03 21:01 UTC] peter at finalarena dot com
Description:
------------
When creating a PDO connection with the Mysql driver, and setting a persistent default fetch mode, PHP will generate an E_WARNING message.

The PDO, Mysql driver is version 5.0.19 as reported by phpinfo.

The source has the comment: "TODO: CRITICAL for final release" 

1816  20 :  if (stmt->dbh->is_persistent) {
1817     :      /* TODO: CRITICAL for final release */
1818   0 :      php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP might crash if you don't call $stmt->setFetchMode() to reset to defaults on this persistent statement.  This will be fixed in a later release");
1819     :  }

Reproduce code:
---------------
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass, array(
  PDO::ATTR_PERSISTENT => true
));

Expected result:
----------------
 PDOStatement::setFetchMode() to run without an E_WARNING.

Actual result:
--------------
Warning: PDOStatement::setFetchMode() [function.setFetchMode]: PHP might crash if you don't call $stmt->setFetchMode() to reset to defaults on this persistent statement. This will be fixed in a later release in ...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-04 03:09 UTC] iliaa@php.net
This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 16:01:33 2024 UTC