ID: 38319
Updated by: [EMAIL PROTECTED]
Reported By: peter at finalarena dot com
-Status: Open
+Status: Assigned
Bug Type: PDO related
Operating System: RHEL3
PHP Version: 5.1.4
-Assigned To:
+Assigned To: wez
Previous Comments:
------------------------------------------------------------------------
[2006-08-03 21:01:12] 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 ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38319&edit=1