From fc4dabbbf64662f54c0443e8d47c676b5c00e222 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 21 Jun 2005 12:11:19 +0000 Subject: [PATCH] Fixed bug #31213 (Sideeffects caused by fix of bug #29493) --- NEWS | 3 +++ ext/standard/array.c | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 076212cf52..9e8f8e3fa0 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ PHP 4 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| +?? ??? 2005, Version 4.4.0 +- Fixed bug #31213 (Sideeffects caused by fix of bug #29493). (Dmitry) + 13 Jun 2005, Version 4.4.0 RC1 - Added man pages for "phpize" and "php-config" scripts. (Jakub Vrana) - Added support for .cc files in extensions. (Brian) diff --git a/ext/standard/array.c b/ext/standard/array.c index bc0e893a1f..0f87fede69 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -1307,7 +1307,11 @@ PHP_FUNCTION(extract) *orig_var = *entry; } else { - (*entry)->is_ref = 1; + if ((*var_array)->refcount > 1) { + SEPARATE_ZVAL_TO_MAKE_IS_REF(entry); + } else { + (*entry)->is_ref = 1; + } zval_add_ref(entry); zend_hash_update(EG(active_symbol_table), final_name.c, final_name.len+1, (void **) entry, sizeof(zval *), NULL); } -- 2.50.1