From: Andrey Hristov Date: Sat, 12 Mar 2005 13:08:19 +0000 (+0000) Subject: - type is either 1 or 2 if second parameter is set. if not set then type X-Git-Tag: php-5.0.1b1~826 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1236cfa38a5d557531798216dbe6d522a47d0bc3;p=php - type is either 1 or 2 if second parameter is set. if not set then type is 0. - use the lvalue for the second rvalue --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 43ac7822af..4052cf0b13 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4678,10 +4678,9 @@ PHP_FUNCTION(str_word_count) convert_to_string_ex(str); - p = s = Z_STRVAL_PP(str); - e = Z_STRVAL_PP(str) + Z_STRLEN_PP(str); + e = Z_STRLEN_PP(str) + (p = s = Z_STRVAL_PP(str)); - if (type == 1 || type == 2) { + if (type) { array_init(return_value); }