cvs: php4 /ext/standard string.c
| From: | Sterling Hughes | Date: | Wed, 21 May 2003 17:38:17 +0000 |
| Subject: | cvs: php4 /ext/standard string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-21186@lists.php.net to get a copy of this message | ||
sterling Wed May 21 13:38:17 2003 EDT
Modified files:
/php4/ext/standard string.c
Log:
be stupid, but at least be smart about being stupid.
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.383 php4/ext/standard/string.c:1.384
--- php4/ext/standard/string.c:1.383 Wed May 21 12:52:09 2003
+++ php4/ext/standard/string.c Wed May 21 13:38:17 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.383 2003/05/21 16:52:09 sterling Exp $ */
+/* $Id: string.c,v 1.384 2003/05/21 17:38:17 sterling Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -836,8 +836,15 @@
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(arr), &pos);
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(arr), (void **) &tmp, &pos) == SUCCESS) {
- convert_to_string_ex(tmp);
-
+ if ((*tmp)->type != IS_STRING) {
+ if (PZVAL_IS_REF(*tmp)) {
+ SEPARATE_ZVAL(tmp);
+ convert_to_string(*tmp);
+ } else {
+ convert_to_string_ex(tmp);
+ }
+ }
+
smart_str_appendl(&implstr, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
if (++i != numelems) {
smart_str_appendl(&implstr, Z_STRVAL_P(delim), Z_STRLEN_P(delim));