|
Mantis - Quercus
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 1965 | minor | always | 08-22-07 15:41 | 10-17-07 17:01 | |
|
|
|||||
| Reporter: | rjc | Platform: | |||
| Assigned To: | ferg | OS: | |||
| Priority: | normal | OS Version: | |||
| Status: | closed | Product Version: | 3.1.2 | ||
| Product Build: | Resolution: | fixed | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | 3.1.4 | ||
|
|
|||||
| 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: | |||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||