Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002398 [Quercus] major always 02-04-08 11:45 05-02-08 18:26
Reporter lee_saferite View Status public  
Assigned To ferg
Priority high Resolution fixed  
Status closed   Product Version 3.1.5
Summary 0002398: Cannot extend SPL ArrayObject
Description When you extend ArrayObject it works, but no values are stored when using the new object.

This is using resin-pro-3.1.s080130
Additional Information Code:
class Test extends ArrayObject
{
    public function __construct()
    {
        parent::__construct();
    }
}
$one = new ArrayObject();
$two = new Test();
$one['one'] = "one here";
$two['two'] = "two here";
header('Content-Type: text/plain');
var_dump($one);
var_dump($two);

Expected Result:
object(ArrayObject)0000001 (1) {
  ["one"]=>
  string(8) "one here"
}
object(Test)0000002 (1) {
  ["two"]=>
  string(8) "two here"
}

Actual Result:
object(ArrayObject) (1) {
  ["one"]=>
  string(8) "one here"
}
object(Test) (0) {
}
Attached Files

- Relationships

- Notes
(0002715)
lee_saferite
02-04-08 12:27

I've tried this on 3.1.4a and it exists there as well.
 
(0002722)
nam
02-05-08 14:32

Values are being stored correctly but var_dump/print_r are not printing out the object correctly.
 
(0002723)
lee_saferite
02-06-08 06:04

I tested this and found that to be true.

Unfortunately, that does not explain the fact that Zend_Registry and several other classes from Zend Framework do not work correctly under Quercus.

Zend_Registry simply 'loses' variables you store in it.

Zend_Registry is a simple class, less than 200 lines, that gets most of it's functionality from ArrayObject.

UPDATE: The problem seems to lie in 'array_key_exists', I will file another bug report.
 
(0002725)
lee_saferite
02-06-08 06:22

See issue: 0002404
 
(0003130)
ferg
05-02-08 18:26

php/4a4u
 

- Issue History
Date Modified Username Field Change
02-04-08 11:45 lee_saferite New Issue
02-04-08 12:27 lee_saferite Note Added: 0002715
02-04-08 12:42 sam Priority normal => high
02-05-08 14:32 nam Note Added: 0002722
02-06-08 06:04 lee_saferite Note Added: 0002723
02-06-08 06:22 lee_saferite Note Added: 0002725
05-02-08 18:26 ferg Note Added: 0003130
05-02-08 18:26 ferg Assigned To  => ferg
05-02-08 18:26 ferg Status new => closed
05-02-08 18:26 ferg Resolution open => fixed
05-02-08 18:26 ferg Fixed in Version  => 3.2.0


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