]> granicus.if.org Git - php/commitdiff
Fixing serialize a bit.
authorAndrey Hristov <andrey@php.net>
Thu, 10 Jun 1999 15:13:26 +0000 (15:13 +0000)
committerAndrey Hristov <andrey@php.net>
Thu, 10 Jun 1999 15:13:26 +0000 (15:13 +0000)
ext/standard/var.c

index e3f1d88a22ba63fac7cd0daf05172fa2499634e0..af5ddf19100a73032b692a818e38f00c779b7bd3 100644 (file)
@@ -205,7 +205,7 @@ void php3api_var_serialize(pval *buf, pval **struc)
                        STR_CAT(buf, s, slen);
                        if (i > 0) {
                                char *key;
-                               pval *data,*d;
+                               pval **data,*d;
                                ulong index;
                                
                                _php3_hash_internal_pointer_reset((*struc)->value.ht);
@@ -213,10 +213,8 @@ void php3api_var_serialize(pval *buf, pval **struc)
                                        if ((i = _php3_hash_get_current_key((*struc)->value.ht, &key, &index)) == HASH_KEY_NON_EXISTANT) {
                                                break;
                                        }
-                                       if (_php3_hash_get_current_data((*struc)->value.ht, (void **) (&data)) != SUCCESS || !data || (data == (*struc))) {
-                                               continue;
-                                       }
-                                       if (data->type==IS_STRING && data->value.str.val==undefined_variable_string) {
+                                       if (_php3_hash_get_current_data((*struc)->value.ht, (void **) (&data)) !=
+                                                       SUCCESS || !data || ((*data) == (*struc))) {
                                                continue;
                                        }