]> granicus.if.org Git - php/commitdiff
- Fix leak with explode of empty unicode string
authorJohannes Schlüter <johannes@php.net>
Mon, 15 Aug 2005 19:12:59 +0000 (19:12 +0000)
committerJohannes Schlüter <johannes@php.net>
Mon, 15 Aug 2005 19:12:59 +0000 (19:12 +0000)
ext/standard/string.c

index 5b67852569bebe44124b0b1637171a1b6d643f96..bbf0b9096f45f6ef63938a41b422eb54f6762fe3 100644 (file)
@@ -1097,7 +1097,7 @@ PHP_FUNCTION(explode)
 
        if ( str_len == 0 ) {
                if ( str_type == IS_UNICODE ) {
-                       add_next_index_unicodel(return_value, USTR_MAKE(""), sizeof("")-1, 1);
+                       add_next_index_unicodel(return_value, USTR_MAKE(""), sizeof("")-1, 0);
                } else if ( str_type == IS_BINARY ) {
                        add_next_index_binaryl(return_value, "", sizeof("")-1, 1);
                } else {