From 1236cfa38a5d557531798216dbe6d522a47d0bc3 Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Sat, 12 Mar 2005 13:08:19 +0000 Subject: [PATCH] - 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 --- ext/standard/string.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); } -- 2.50.1