rasmus Wed Apr 2 16:33:03 2003 EDT Modified files: /php4/ext/standard string.c Log: MFB: Fix the setlocale() segfault Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.368 php4/ext/standard/string.c:1.369 --- php4/ext/standard/string.c:1.368 Tue Apr 1 19:25:45 2003 +++ php4/ext/standard/string.c Wed Apr 2 16:33:02 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.368 2003/04/02 00:25:45 iliaa Exp $ */ +/* $Id: string.c,v 1.369 2003/04/02 21:33:02 rasmus Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3377,6 +3377,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