summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;