PDO persistent connectrions still produce E_WARNING
| Bug #38319 | PDO persistent connectrions still produce E_WARNING | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2006-08-03 21:01 UTC | Modified: | 2006-12-04 03:09 UTC |
|
||||||||||
| 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 | |||||||||||
[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 commits
[2006-12-04 03:09 UTC] iliaa@php.net