cvs: /php4/ext/wddx wddx.c

From: Date: Wed, 18 Aug 1999 16:43:57 +0000
Subject: cvs: /php4/ext/wddx wddx.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-3552@lists.php.net to get a copy of this message
andrey Wed Aug 18 12:43:57 1999 EDT Modified files: /php4/ext/wddx wddx.c Log: Ported fixed for bug #2103 from PHP3. Index: php4/ext/wddx/wddx.c diff -u php4/ext/wddx/wddx.c:1.2 php4/ext/wddx/wddx.c:1.3 --- php4/ext/wddx/wddx.c:1.2 Fri Jul 23 17:21:33 1999 +++ php4/ext/wddx/wddx.c Wed Aug 18 12:43:57 1999 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: wddx.c,v 1.2 1999/07/23 21:21:33 andrey Exp $ */ +/* $Id: wddx.c,v 1.3 1999/08/18 16:43:57 andrey Exp $ */ #include "php.h" #include "php_wddx.h" @@ -463,6 +463,7 @@ ent.varname = NULL; ent.data = (zval *)emalloc(sizeof(zval)); + ent.data->value.str.val = NULL; ent.data->value.str.len = 0; INIT_PZVAL(ent.data); wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry)); @@ -546,7 +547,7 @@ ent1->varname, strlen(ent1->varname)+1, &ent1->data, sizeof(zval *), NULL); efree(ent1->varname); - } else { + } else { zend_hash_next_index_insert(ent2->data->value.ht, &ent1->data, sizeof(zval *), NULL); @@ -555,6 +556,8 @@ efree(ent1); } } + else if (!strcmp(name, EL_VAR) && stack->varname) + efree(stack->varname); } /* }}} */ @@ -835,7 +838,11 @@ if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &packet) == FAILURE) { WRONG_PARAM_COUNT; } - + + convert_to_string(packet); + if (packet->value.str.len == 0) + return; + _php_wddx_deserialize(packet, return_value); } /* }}} */

« previous php.version4 (#3552) next »