ID:               30074
 Updated by:       [EMAIL PROTECTED]
 Reported By:      owen dot beresford at murphx dot com
-Status:           No Feedback
+Status:           Closed
 Bug Type:         Scripting Engine problem
 Operating System: linux
 PHP Version:      5.0.1
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2006-12-10 00:55:50] shire at facebook dot com

I forgot to specify that in this case extract is setting the
EG(uninitialized_zval_ptr)->is_ref = 1, causing further problems later
in the code.

------------------------------------------------------------------------

[2006-12-10 00:54:25] shire at facebook dot com

I'm able to reproduce this using current CVS.  The problem appears to
be when a CV value is passed into extract() either as the array or an
array value.  Looks like in this case the IS_CV value is assigned to
EG(uninitialized_zval_ptr).  The following patch will correct the
problem for this case (and still pass a php 'make test').  However I'm
not familiar enough with CV to know if there's a better way to correct
to this problem:

diff --git a/ext/standard/array.c b/ext/standard/array.c
index fad4bf2..fdc9a88 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -1438,7 +1438,7 @@ PHP_FUNCTION(extract)
 
                                                *orig_var = *entry;
                                        } else {
-                                               if
((*var_array)->refcount > 1) {
+                                               if
((*var_array)->refcount > 1 || *entry == EG(uninitialized_zval_ptr)) {
                                                       
SEPARATE_ZVAL_TO_MAKE_IS_REF(entry);
                                                } else {
                                                       
(*entry)->is_ref = 1;

------------------------------------------------------------------------

[2005-06-15 23:06:27] t3 at rohms dot com

Has this bug been fixed in a release yet?  I'd like to see comments
added to these to indicate so and with what versions.

------------------------------------------------------------------------

[2005-03-15 01:00:12] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2005-03-07 21:42:05] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/30074

-- 
Edit this bug report at http://bugs.php.net/?id=30074&edit=1

Reply via email to