diff options
| author | Rasmus Lerdorf <rasmus@php.net> | 2003-04-02 21:33:02 +0000 |
|---|---|---|
| committer | Rasmus Lerdorf <rasmus@php.net> | 2003-04-02 21:33:02 +0000 |
| commit | 1612ffad059b11dfa55c9f6692b637b9849be677 (patch) | |
| tree | 5a94538392f1a9d05d69f7ccf5d9edd762bdfab4 | |
| parent | a90ea73ef807e7dce424ef5f274a7d98dbab19c6 (diff) | |
| download | php-git-1612ffad059b11dfa55c9f6692b637b9849be677.tar.gz | |
MFB: Fix the setlocale() segfault
| -rw-r--r-- | ext/standard/string.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index 371a72eb7d..9aac0a2674 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3377,6 +3377,7 @@ PHP_FUNCTION(setlocale) } 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]; |
