]> granicus.if.org Git - php/commitdiff
Fix up var.c a bit.
authorAndrey Hristov <andrey@php.net>
Fri, 11 Jun 1999 15:54:06 +0000 (15:54 +0000)
committerAndrey Hristov <andrey@php.net>
Fri, 11 Jun 1999 15:54:06 +0000 (15:54 +0000)
ext/standard/var.c

index 1efc882c74246be06c863a3e6deebad2e1b70222..d8caa2a753c4fe4dd4af9d9b9fa7bf053837beff 100644 (file)
@@ -199,7 +199,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);
@@ -207,10 +207,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;
                                        }
 
@@ -244,7 +242,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;
 
                                zend_hash_internal_pointer_reset((*struc)->value.obj.properties);
@@ -252,10 +250,8 @@ void php3api_var_serialize(pval *buf, pval **struc)
                                        if ((i = _php3_hash_get_current_key((*struc)->value.obj.properties, &key, &index)) == HASH_KEY_NON_EXISTANT) {
                                                break;
                                        }
-                                       if (_php3_hash_get_current_data((*struc)->value.obj.properties, (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.obj.properties, (void **)
+                                                       (&data)) != SUCCESS || !data || ((*data) == (*struc))) {
                                                continue;
                                        }