Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001155 [Quercus] major always 05-26-06 22:11 05-30-06 08:33
Reporter koreth View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.0.20 Product Version 3.0.20
  Product Build
Summary 0001155: Multidimensional array copies contain references to original array
Description PHP:

<?php
$a1['x']['a'] = 1;
$a2 = $a1;
unset($a1['x']['a']);
print $a2['x']['a'];
?>

On Zend PHP, this prints "1". On Quercus, it prints nothing -- unsetting the second-dimension array element in $a1 also modifies $a2.

This does not happen on the first dimension of an array, only on the second and greater dimensions.
Steps To Reproduce
Additional Information 060526 snapshot
Attached Files

- Relationships

- Notes
(0001243)
koreth
05-26-06 22:25

A "fix" (which I assume is not optimal for performance reasons) is to comment out the ArrayValueImpl(ArrayValueImpl) constructor so the generic ArrayValueImpl(ArrayValue) one is used instead. That makes the test pass and makes the problems this bug was causing in my real code go away.
 
(0001245)
ferg
05-30-06 08:33

php/044x, php/344x
 

- Issue History
Date Modified Username Field Change
05-26-06 22:11 koreth New Issue
05-26-06 22:25 koreth Note Added: 0001243
05-30-06 08:33 ferg Note Added: 0001245
05-30-06 08:33 ferg Assigned To  => ferg
05-30-06 08:33 ferg Status new => closed
05-30-06 08:33 ferg Resolution open => fixed
05-30-06 08:33 ferg Fixed in Version  => 3.0.20


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker