| Anonymous | Login | Signup for a new account | 10-31-2025 21:07 PDT |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ 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 | ||||||
| Status | closed | Product Version | 3.1.2 | ||||||
| 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(). |
||||||||
| Additional Information | |||||||||
| Attached Files | |||||||||
|
|
|||||||||
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} |
| Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
32 total queries executed. 27 unique queries executed. |