From: Sterling Hughes Date: Wed, 21 May 2003 17:44:08 +0000 (+0000) Subject: seems there is only the stupid way to be stupid (implode copying array X-Git-Tag: RELEASE_1_0_2~652 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24eee37fed3faa1791753e246d9b4bb7847bb8a5;p=php seems there is only the stupid way to be stupid (implode copying array elements) at least we check for IS_STRING, which should clear this up 90% of the time --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 5fac07cf70..8be51df6fa 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -837,12 +837,8 @@ PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value) while (zend_hash_get_current_data_ex(Z_ARRVAL_P(arr), (void **) &tmp, &pos) == SUCCESS) { if ((*tmp)->type != IS_STRING) { - if (PZVAL_IS_REF(*tmp)) { - SEPARATE_ZVAL(tmp); - convert_to_string(*tmp); - } else { - convert_to_string_ex(tmp); - } + SEPARATE_ZVAL(tmp); + convert_to_string(*tmp); } smart_str_appendl(&implstr, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));