com php-src: Fixed fetch into refcount hanlding (now 3 test fails): ext/pdo/pdo_stmt.c

From: Date: Fri, 25 Apr 2014 03:45:23 +0000
Subject: com php-src: Fixed fetch into refcount hanlding (now 3 test fails): ext/pdo/pdo_stmt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77284@lists.php.net to get a copy of this message
Commit: 2178612186e030b344f05a85fda6e46851b5a598 Author: Xinchen Hui <laruence@gmail.com> Fri, 25 Apr 2014 11:45:23 +0800 Parents: c5f9b86fd4de8338cb390a92ec40bd1d65618cc4 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2178612186e030b344f05a85fda6e46851b5a598 Log: Fixed fetch into refcount hanlding (now 3 test fails) Changed paths: M ext/pdo/pdo_stmt.c Diff: diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index e64a8e2..642274c 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;

« previous php.cvs (#77284) next »