From c866e67313cfd5d1dbf53780f152e62ac533ae2d Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Fri, 11 Apr 2014 20:15:51 +0200 Subject: [PATCH] Call INIT_ZVAL on stack-allocated zval --- v8js.cc | 1 + v8js_convert.cc | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/v8js.cc b/v8js.cc index f3dda33..5943fd6 100644 --- a/v8js.cc +++ b/v8js.cc @@ -932,6 +932,7 @@ static PHP_METHOD(V8Js, __construct) } zval zmember; + INIT_ZVAL(zmember); ZVAL_STRING(&zmember, member, 0); zend_property_info *property_info = zend_get_property_info(c->std.ce, &zmember, 1 TSRMLS_CC); diff --git a/v8js_convert.cc b/v8js_convert.cc index a320502..ef34f3f 100644 --- a/v8js_convert.cc +++ b/v8js_convert.cc @@ -48,6 +48,7 @@ static void php_v8js_call_php_func(zval *value, zend_class_entry *ce, zend_funct max_num_args = method_ptr->common.num_args; /* Function name to call */ + INIT_ZVAL(fname); ZVAL_STRING(&fname, method_ptr->common.function_name, 0); /* zend_fcall_info */ @@ -605,6 +606,7 @@ static inline v8::Local php_v8js_named_property_callback(v8::Local php_v8js_named_property_callback(v8::Local php_v8js_named_property_callback(v8::Local php_v8js_named_property_callback(v8::Local