@@ -584,6 +584,7 @@ void pack_key(zval *args, char select, zval *arr) {
584584 array_init (arr );
585585 return ;
586586 }
587+ Z_TRY_ADDREF_P (args );
587588 array_init (arr );
588589 add_next_index_zval (arr , args );
589590}
@@ -659,7 +660,7 @@ int get_spaceno_by_name(tarantool_connection *obj, zval *name) {
659660 }
660661
661662 if (tarantool_schema_add_spaces (obj -> schema , resp .data , resp .data_len )) {
662- fprintf (stderr , "%s" , php_base64_encode (resp .data , resp .data_len )-> val );
663+ // fprintf(stderr, "%s", php_base64_encode(resp.data, resp.data_len)->val);
663664 tarantool_throw_parsingexception ("schema (space)" );
664665 return FAILURE ;
665666 }
@@ -719,7 +720,7 @@ int get_indexno_by_name(tarantool_connection *obj, int space_no,
719720 }
720721
721722 if (tarantool_schema_add_indexes (obj -> schema , resp .data , resp .data_len )) {
722- fprintf (stderr , "%s" , php_base64_encode (resp .data , resp .data_len )-> val );
723+ // fprintf(stderr, "%s", php_base64_encode(resp.data, resp.data_len)->val);
723724 tarantool_throw_parsingexception ("schema (index)" );
724725 return FAILURE ;
725726 }
@@ -774,7 +775,7 @@ int get_fieldno_by_name(tarantool_connection *obj, uint32_t space_no,
774775 }
775776
776777 if (tarantool_schema_add_spaces (obj -> schema , resp .data , resp .data_len )) {
777- fprintf (stderr , "%s" , php_base64_encode (resp .data , resp .data_len )-> val );
778+ // fprintf(stderr, "%s", php_base64_encode(resp.data, resp.data_len)->val);
778779 tarantool_throw_parsingexception ("schema (space)" );
779780 return FAILURE ;
780781 }
@@ -1220,15 +1221,15 @@ int __tarantool_authenticate(tarantool_connection *obj) {
12201221 if (tarantool_schema_add_spaces (obj -> schema , resp .data ,
12211222 resp .data_len ) &&
12221223 status != FAILURE ) {
1223- fprintf (stderr , "%s" , php_base64_encode (resp .data , resp .data_len )-> val );
1224+ // fprintf(stderr, "%s", php_base64_encode(resp.data, resp.data_len)->val);
12241225 tarantool_throw_parsingexception ("schema (space)" );
12251226 status = FAILURE ;
12261227 }
12271228 } else if (resp .sync == index_sync ) {
12281229 if (tarantool_schema_add_indexes (obj -> schema , resp .data ,
12291230 resp .data_len ) &&
12301231 status != FAILURE ) {
1231- fprintf (stderr , "%s" , php_base64_encode (resp .data , resp .data_len )-> val );
1232+ // fprintf(stderr, "%s", php_base64_encode(resp.data, resp.data_len)->val);
12321233 tarantool_throw_parsingexception ("schema (index)" );
12331234 status = FAILURE ;
12341235 }
@@ -1499,13 +1500,13 @@ PHP_METHOD(Tarantool, update) {
14991500 size_t before_len = SSTR_LEN (obj -> value );
15001501 char * sz = php_tp_encode_update (obj -> value , sync , space_no ,
15011502 index_no , & key_new );
1503+ zval_ptr_dtor (& key_new );
15021504 if (tarantool_uwrite_ops (obj , args , space_no ) == -1 ) {
15031505 /* rollback all written changes */
15041506 SSTR_LEN (obj -> value ) = before_len ;
15051507 RETURN_FALSE ;
15061508 }
15071509 php_tp_reencode_length (obj -> value , sz );
1508- zval_ptr_dtor (& key_new );
15091510 if (tarantool_stream_send (obj ) == FAILURE )
15101511 RETURN_FALSE ;
15111512
0 commit comments