| Anonymous | Login | Signup for a new account | 11-30-2025 07:47 PST |
| 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 | ||||
| 0001886 | [Quercus] | major | always | 07-19-07 18:28 | 07-20-07 08:19 | ||||
| Reporter | rjc | View Status | public | ||||||
| Assigned To | sam | ||||||||
| Priority | normal | Resolution | fixed | ||||||
| Status | closed | Product Version | 3.1.1 | ||||||
| Summary | 0001886: Assignments to function parameters cause local variables to be created which shadow the parameters ONLY IN COMPILED PHP | ||||||||
| Description |
In MediaWiki Parser.php, there is a function extractTagsAndParams with the following signature: function extractTagsAndParams($elements, $text, &$matches, $uniq_prefix = ''){ static $n = 1; $stripped = ''; $matches = array(); as you can see, $matches is in fact, a variable array passed by reference. In interpreted mode, this works as expected and the array passed as a parameter is assigned an empty array. In compiled mode, the line "$matches = array()" actually creates a new local variable with an empty array which shadows the $matches parameter. Any further modifications to $matches only effect the local copy. I suspect this is because the Java scoping semantics are coming into play with the generated code. |
||||||||
| Additional Information | |||||||||
| Attached Files | |||||||||
|
|
|||||||||
| Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed. 26 unique queries executed. |