CVS update: php3/functions

From: Date: Mon, 17 May 1999 19:47:57 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-5746@lists.php.net to get a copy of this message
Date: Monday May 17, 1999 @ 15:47 Author: rasmus Update of /repository/php3/functions In directory php:/tmp/cvs-serv30491/functions Modified Files: string.c Log Message: Ouch, another str_replace() bug. This function definitely holds the record for the most bugs. Index: php3/functions/string.c diff -u php3/functions/string.c:1.189 php3/functions/string.c:1.190 --- php3/functions/string.c:1.189 Wed May 12 08:52:03 1999 +++ php3/functions/string.c Mon May 17 15:47:57 1999 @@ -30,7 +30,7 @@ */ -/* $Id: string.c,v 1.189 1999/05/12 12:52:03 rasmus Exp $ */ +/* $Id: string.c,v 1.190 1999/05/17 19:47:57 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif @@ -1491,6 +1491,10 @@ convert_to_string(haystack); convert_to_string(needle); convert_to_string(str); + + if(haystack->value.str.len == 0) { + RETURN_FALSE; + } if(needle->value.str.len == 1) { _php3_char_to_str(haystack->value.str.val,haystack->value.str.len,needle->value.str.val[0],str->value.str.val, str->value.str.len ,return_value); -- 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 (#5746) next »