]> 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:10:59 +0000 (12:10 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 21 Jun 2005 12:10:59 +0000 (12:10 +0000)
NEWS
ext/standard/array.c

diff --git a/NEWS b/NEWS
index 63d66b1eb9fb7f65a3b3b6cb8867dbfeb6512554..cc85e6295b5fa5b7b23264423ac6418e4fe5e71b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -130,6 +130,7 @@ PHP                                                                        NEWS
   serializer). (Dmitry) 
 - Fixed bug #31465 (False warning in unpack() when working with *). (Ilia)
 - Fixed bug #31363 (broken non-blocking flock()). ian at snork dot net
+- Fixed bug #31213 (Sideeffects caused by fix of bug #29493). (Dmitry)
 - Fixed bug #30961 (Wrong linenumber in ReflectionClass getStartLine()).
   (Dmitry)
 - Fixed bug #30889 (Conflict between __get/__set and ++ operator). (Dmitry)
index 953b66750735286362d901374c4015af0c92b343..18c92beeba34e24f963703ae0a5ca93cfe096b9e 100644 (file)
@@ -1400,7 +1400,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);
                                        }