cvs: php4 /ext/standard string.c

From: Date: Mon, 24 Sep 2001 08:33:51 +0000
Subject: cvs: php4 /ext/standard string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-7519@lists.php.net to get a copy of this message
derick Mon Sep 24 04:33:51 2001 EDT Modified files: /php4/ext/standard string.c Log: - Fix crash bug (patch by <chocolateboy@lunomail.com>) Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.243 php4/ext/standard/string.c:1.244 --- php4/ext/standard/string.c:1.243 Sun Sep 23 14:32:46 2001 +++ php4/ext/standard/string.c Mon Sep 24 04:33:51 2001 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.243 2001/09/23 18:32:46 jeroen Exp $ */ +/* $Id: string.c,v 1.244 2001/09/24 08:33:51 derick Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2990,6 +2990,11 @@ convert_to_string_ex(str); + /* bail out if the string is empty */ + if (Z_STRLEN_PP(str) == 0) { + RETURN_EMPTY_STRING(); + } + /* Windows style line-endings */ tmp = php_str_to_str((*str)->value.str.val, (*str)->value.str.len, "\r\n", 2, "<br />\r\n", 8, &new_length); if (new_length != (*str)->value.str.len)

« previous php.cvs (#7519) next »