rasmus Wed Apr 2 16:31:52 2003 EDT Modified files: (Branch: PHP_4_3) /php4 TODO_SEGFAULTS /php4/ext/standard string.c Log: Fix the setlocale() segfault Index: php4/TODO_SEGFAULTS diff -u php4/TODO_SEGFAULTS:1.1.2.8 php4/TODO_SEGFAULTS:1.1.2.9 --- php4/TODO_SEGFAULTS:1.1.2.8 Tue Apr 1 16:44:47 2003 +++ php4/TODO_SEGFAULTS Wed Apr 2 16:31:52 2003 @@ -9,6 +9,8 @@ exif_imagetype,exif_thumbnail (Rasmus) dbase_open (Rasmus) array_pad (Rasmus) + str_repeat (Ilia) + setlocale (Rasmus) Open: @@ -18,7 +20,6 @@ mb_eregi (2) mb_split ob_start (3) - setlocale unregister_tick_function xml_parser_create Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.333.2.19 php4/ext/standard/string.c:1.333.2.20 --- php4/ext/standard/string.c:1.333.2.19 Tue Apr 1 19:25:57 2003 +++ php4/ext/standard/string.c Wed Apr 2 16:31:52 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.333.2.19 2003/04/02 00:25:57 iliaa Exp $ */ +/* $Id: string.c,v 1.333.2.20 2003/04/02 21:31:52 rasmus Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3121,6 +3121,7 @@ } while (1) { if (Z_TYPE_PP(args[1]) == IS_ARRAY) { + if(!zend_hash_num_elements(Z_ARRVAL_PP(args[1]))) break; zend_hash_get_current_data(Z_ARRVAL_PP(args[1]),(void **)&plocale); } else { plocale = args[i];
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php