Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003155 [Quercus] minor always 12-12-08 00:15 12-14-08 12:06
Reporter koreth View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 4.0.0
Summary 0003155: Can't access static member of superclass declared after subclass
Description <?php
class Child extends Mommy {
  public static function foo() {
    print parent::$var;
  }
}
class Mommy {
  public static $var = 'hi there';
}
Child::foo();

This works in regular PHP. In Quercus it prints "Fatal Error: Mommy::$var is an undeclared static property".

In our real-world case, these two classes are in separate .php files, if that matters.
Additional Information
Attached Files

- Relationships

- Notes
(0003611)
koreth
12-12-08 11:50

This is low priority, BTW. I was able to rearrange our include_once directives so the superclass gets loaded first, in which case the error doesn't occur.
 
(0003622)
ferg
12-14-08 12:06

php/394h
 

- Issue History
Date Modified Username Field Change
12-12-08 00:15 koreth New Issue
12-12-08 11:50 koreth Note Added: 0003611
12-14-08 12:06 ferg Note Added: 0003622
12-14-08 12:06 ferg Assigned To  => ferg
12-14-08 12:06 ferg Status new => closed
12-14-08 12:06 ferg Resolution open => fixed
12-14-08 12:06 ferg Fixed in Version  => 4.0.0


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