cvs: php4(PHP_4_2_0) /ext/standard var.c

From: Date: Mon, 29 Apr 2002 16:03:57 +0000
Subject: cvs: php4(PHP_4_2_0) /ext/standard var.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11536@lists.php.net to get a copy of this message
stas Mon Apr 29 12:03:57 2002 EDT Modified files: (Branch: PHP_4_2_0) /php4/ext/standard var.c Log: MFH Index: php4/ext/standard/var.c diff -u php4/ext/standard/var.c:1.131.2.2 php4/ext/standard/var.c:1.131.2.3 --- php4/ext/standard/var.c:1.131.2.2 Mon Apr 29 11:45:58 2002 +++ php4/ext/standard/var.c Mon Apr 29 12:03:57 2002 @@ -513,12 +513,14 @@ } case IS_ARRAY: myht = HASH_OF(*struc); - i = zend_hash_num_elements(myht); if (Z_TYPE_PP(struc) == IS_ARRAY) { smart_str_appendl(buf, "a:", 2); } else { php_var_serialize_class_name(buf, struc TSRMLS_CC); } + /* count after serializing name, since php_var_serialize_class_name + changes the count if the variable is incomplete class */ + i = zend_hash_num_elements(myht); smart_str_append_long(buf, i); smart_str_appendl(buf, ":{", 2); if (i > 0) {

« previous php.cvs (#11536) next »