CVS update: php3/functions

From: Date: Wed, 27 Jan 1999 19:45:17 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-3747@lists.php.net to get a copy of this message
Date: Wednesday January 27, 1999 @ 14:45 Author: rasmus Update of /repository/php3/functions In directory asf:/home/rasmus/php3/functions Modified Files: string.c Log Message: Fix implode() bug - When imploding an array that contained unset() elements it wasn't correctly skipping past these Guys, be careful if you are manually walking through an array hash. Elements that have been unset() aren't actually completely gone. They are just marked as being deleted and you need to make sure you are not trying to do something with a deleted element. Index: php3/functions/string.c diff -c php3/functions/string.c:1.171 php3/functions/string.c:1.172 *** php3/functions/string.c:1.171 Wed Jan 20 16:17:10 1999 --- php3/functions/string.c Wed Jan 27 14:45:16 1999 *************** *** 30,36 **** */ ! /* $Id: string.c,v 1.171 1999/01/20 21:17:10 sas Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif --- 30,36 ---- */ ! /* $Id: string.c,v 1.172 1999/01/27 19:45:16 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif *************** *** 299,305 **** _php3_hash_internal_pointer_reset(arr->value.ht); while (_php3_hash_get_current_data(arr->value.ht, (void **) &tmp) == SUCCESS) { convert_to_string(tmp); ! if (tmp->type == IS_STRING) { len += tmp->value.str.len; if (count>0) { len += delim->value.str.len; --- 299,305 ---- _php3_hash_internal_pointer_reset(arr->value.ht); while (_php3_hash_get_current_data(arr->value.ht, (void **) &tmp) == SUCCESS) { convert_to_string(tmp); ! if (tmp->type == IS_STRING && tmp->value.str.val != undefined_variable_string) { len += tmp->value.str.len; if (count>0) { len += delim->value.str.len; -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3747) next »