|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-04 03:09 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 18:00:01 2025 UTC |
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 ...