]> granicus.if.org Git - php/commitdiff
Fixed bug #31213 (Sideeffects caused by fix of bug #29493)
authorDmitry Stogov <dmitry@php.net>
Tue, 21 Jun 2005 12:11:19 +0000 (12:11 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 21 Jun 2005 12:11:19 +0000 (12:11 +0000)
NEWS
ext/standard/array.c

diff --git a/NEWS b/NEWS
index 076212cf529a85c2f05096ac3ec9e2f2bc761c90..9e8f8e3fa095ac2ddd6cb2d122bdc5527f6299ed 100644 (file)
--- 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)
index bc0e893a1f201e7ed5e8d0df17dac89539176914..0f87fede69bbc97637f5ed12b187f6a3f41d943b 100644 (file)
@@ -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);
                                        }