summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-07-31 22:48:42 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-07-31 22:48:42 +0000
commitc72d39f7637f637832f80473fad274b028a6cefa (patch)
tree26a8375925f4bd43e8fd8a0297ddf3ca5087b08d
parent4db96af53faf27858d9cdc7637b39d74b60c77dd (diff)
downloadphp-git-c72d39f7637f637832f80473fad274b028a6cefa.tar.gz
Fixed bug #41971 (PDOStatement::fetch and PDOStatement::setFetchMode causes
unexpected behavior).
-rw-r--r--NEWS2
-rwxr-xr-xext/pdo/pdo_stmt.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index cacb4ed983..d5f3c409d9 100644
--- a/NEWS
+++ b/NEWS
@@ -90,6 +90,8 @@ PHP NEWS
- Fixed bug #41989 (move_uploaded_file() & relative path in ZTS mode). (Tony)
- Fixed bug #41984 (Hangs on large SoapClient requests). (Dmitry)
- Fixed bug #41983 (Error Fetching http headers terminated by '\n'). (Dmitry)
+- Fixed bug #41971 (PDOStatement::fetch and PDOStatement::setFetchMode causes
+ unexpected behavior). (Ilia)
- Fixed bug #41964 (strtotime returns a timestamp for non-time string of
pattern '(A|a) .+'). (Derick)
- Fixed bug #41961 (Ensure search for hidden private methods does not stray
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index bb0ed50b0e..b6b278d5b4 100755
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -867,10 +867,10 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
zend_class_entry *ce = NULL, *old_ce = NULL;
zval grp_val, *grp, **pgrp, *retval, *old_ctor_args = NULL;
- how = how & ~PDO_FETCH_FLAGS;
if (how == PDO_FETCH_USE_DEFAULT) {
how = stmt->default_fetch_type;
}
+ how = how & ~PDO_FETCH_FLAGS;
if (!do_fetch_common(stmt, ori, offset, do_bind TSRMLS_CC)) {
return 0;