]> granicus.if.org Git - php/commitdiff
Fixed reference handling of bind_result
authorXinchen Hui <laruence@php.net>
Thu, 19 Jun 2014 08:08:45 +0000 (16:08 +0800)
committerXinchen Hui <laruence@php.net>
Thu, 19 Jun 2014 08:08:45 +0000 (16:08 +0800)
ext/mysqlnd/mysqlnd_ps.c

index 4019aabec053549989ee29ae1ed70d8fffa88d3e..b114296130879900228cb442e00c11f43bf5cb44 100644 (file)
@@ -1183,8 +1183,8 @@ MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const s, zend_bool * const fe
                */
                for (i = 0; i < stmt->result->field_count; i++) {
                        if (stmt->result_bind[i].bound == TRUE) {
-                               zval_dtor(&stmt->result_bind[i].zv);
-                               ZVAL_NULL(&stmt->result_bind[i].zv);
+                               zval_dtor(Z_REFVAL(stmt->result_bind[i].zv));
+                               ZVAL_NULL(Z_REFVAL(stmt->result_bind[i].zv));
                        }
                }
                stmt->result_zvals_separated_once = TRUE;