From: Dmitry Stogov Date: Tue, 21 Jun 2005 12:11:19 +0000 (+0000) Subject: Fixed bug #31213 (Sideeffects caused by fix of bug #29493) X-Git-Tag: php-4.4.0RC2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc4dabbbf64662f54c0443e8d47c676b5c00e222;p=php Fixed bug #31213 (Sideeffects caused by fix of bug #29493) --- 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); }