@@ -61,7 +61,7 @@ static int node_php_embed_ub_write(const char *str,
6161 ZVal stream{ZEND_FILE_LINE_C}, retval{ZEND_FILE_LINE_C};
6262 worker->GetStream ().ToPhp (channel, stream TSRMLS_CC);
6363 // Use plain zval to avoid allocating copy of method name.
64- zval method; ZVAL_STRINGL (&method, " write" , 5 , 0 );
64+ zval method; INIT_ZVAL (method); ZVAL_STRINGL (&method, " write" , 5 , 0 );
6565 // Special buffer type to pass `str` as a node buffer and avoid copying.
6666 zval buffer, *args[] = { &buffer }; INIT_ZVAL (buffer);
6767 node_php_embed::node_php_jsbuffer_create (&buffer, str, str_length,
@@ -89,7 +89,7 @@ static void node_php_embed_flush(void *server_context) {
8989 ZVal stream{ZEND_FILE_LINE_C}, retval{ZEND_FILE_LINE_C};
9090 worker->GetStream ().ToPhp (channel, stream TSRMLS_CC);
9191 // Use plain zval to avoid allocating copy of method name.
92- zval method; ZVAL_STRINGL (&method, " write" , 5 , 0 );
92+ zval method; INIT_ZVAL (method); ZVAL_STRINGL (&method, " write" , 5 , 0 );
9393 // Special buffer type to pass `str` as a node buffer and avoid copying.
9494 zval buffer; INIT_ZVAL (buffer);
9595 node_php_embed::node_php_jsbuffer_create (&buffer, " " , 0 ,
@@ -123,7 +123,7 @@ static void node_php_embed_send_header(sapi_header_struct *sapi_header,
123123 // Use plain zval to avoid allocating copy of method name.
124124 // The "sendHeader" method is a special JS-side method to translate
125125 // headers into node.js format.
126- zval method; ZVAL_STRINGL (&method, " sendHeader" , 10 , 0 );
126+ zval method; INIT_ZVAL (method); ZVAL_STRINGL (&method, " sendHeader" , 10 , 0 );
127127 // Special buffer type to pass `str` as a node buffer and avoid copying.
128128 zval buffer, *args[] = { &buffer }; INIT_ZVAL (buffer);
129129 if (sapi_header) { // NULL is passed to indicate "last call"
@@ -152,8 +152,8 @@ static int node_php_embed_read_post(char *buffer, uint count_bytes TSRMLS_DC) {
152152 ZVal stream{ZEND_FILE_LINE_C}, retval{ZEND_FILE_LINE_C};
153153 worker->GetStream ().ToPhp (channel, stream TSRMLS_CC);
154154 // Use plain zval to avoid allocating copy of method name.
155- zval method; ZVAL_STRINGL (&method, " read" , 4 , 0 );
156- zval size; ZVAL_LONG (&size, count_bytes);
155+ zval method; INIT_ZVAL (method); ZVAL_STRINGL (&method, " read" , 4 , 0 );
156+ zval size; INIT_ZVAL (size); ZVAL_LONG (&size, count_bytes);
157157 // Create the special JsWait object.
158158 zval wait; INIT_ZVAL (wait);
159159 node_php_embed::node_php_jswait_create (&wait TSRMLS_CC);
0 commit comments