Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001965 [Quercus] minor always 08-22-07 15:41 10-17-07 17:01
Reporter rjc View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.1.4 Product Version 3.1.2
  Product Build
Summary 0001965: __get() and infinite loop
Description MediaWiki contains the following code in includes/filerepo/File.php


 function __get( $name ) {
                $function = array( $this, 'get' . ucfirst( $name ) );
                if ( !is_callable( $function ) ) {
                        return null;
                } else {
                        $this->$name = call_user_func( $function );
                        return $this->$name;
                }
        }

It also includes a function called getName()

 public function getName() {
                if ( !isset( $this->name ) ) {
                        $this->name = $this->repo->getNameFromTitle( $this->title );
                }
                return $this->name;
        }

Calling getName() produces an infinite loop with a stack overflow. This code works in PHP5. Apparently, in PHP5 references to property fields via $this do not invoke __get().
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0002226)
rjc
08-23-07 12:25

I filed this as minor, but on retrospect, it seems like a major bug.
 
(0002359)
ferg
10-17-07 17:01

php/09k{c,d,e} php/39k{c,d,e}
 

- Issue History
Date Modified Username Field Change
08-22-07 15:41 rjc New Issue
08-23-07 12:25 rjc Note Added: 0002226
10-17-07 17:01 ferg Note Added: 0002359
10-17-07 17:01 ferg Assigned To  => ferg
10-17-07 17:01 ferg Status new => closed
10-17-07 17:01 ferg Resolution open => fixed
10-17-07 17:01 ferg Fixed in Version  => 3.1.4
10-17-07 17:01 ferg Description Updated


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