summaryrefslogtreecommitdiff
path: root/ext/pdo/pdo_stmt.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2014-04-25 11:45:23 +0800
committerXinchen Hui <laruence@gmail.com>2014-04-25 11:45:23 +0800
commit2178612186e030b344f05a85fda6e46851b5a598 (patch)
tree0293defb199f174280ab26d23c311a8f92862cbb /ext/pdo/pdo_stmt.c
parentc5f9b86fd4de8338cb390a92ec40bd1d65618cc4 (diff)
downloadphp-git-2178612186e030b344f05a85fda6e46851b5a598.tar.gz
Fixed fetch into refcount hanlding (now 3 test fails)
Diffstat (limited to 'ext/pdo/pdo_stmt.c')
-rw-r--r--ext/pdo/pdo_stmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index e64a8e2da4..642274c13d 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -984,7 +984,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_
break;
}
- ZVAL_OBJ(return_value, Z_OBJ(stmt->fetch.into));
+ ZVAL_COPY(return_value, &stmt->fetch.into);
if (zend_get_class_entry(Z_OBJ_P(return_value) TSRMLS_CC) == ZEND_STANDARD_CLASS_DEF_PTR) {
how = PDO_FETCH_OBJ;
@@ -1994,7 +1994,7 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in
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");
}
#endif
- ZVAL_OBJ(&stmt->fetch.into, Z_OBJ(args[skip+1]));
+ ZVAL_COPY(&stmt->fetch.into, &args[skip+1]);
}
break;