Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002934 [Quercus] block always 09-14-08 11:26 09-15-08 16:25
Reporter koreth View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.2.1 Product Version 3.2.1
  Product Build
Summary 0002934: Modified local array variable value lost when leaving "try" block in compiled mode
Description <?php
function doit() {
  $foo = null;
  try {
    $foo = array('x' => array());
    $foo['x'][] = 1;
  }
  catch (Exception $e) { }

  if ($foo === null) {
    print "uh oh";
  } else {
    print "whew";
  }
}

doit();


This prints "whew" (the expected result since the array should never be null) in interpreted mode, but "uh oh" in compiled mode. If you put a print_r($foo) at the end of the try block, you see the expected output in both compiled and interpreted modes, but the value is discarded when the try block exits in compiled mode.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003442)
ferg
09-15-08 16:25

php/3g11

 

- Issue History
Date Modified Username Field Change
09-14-08 11:26 koreth New Issue
09-15-08 16:25 ferg Note Added: 0003442
09-15-08 16:25 ferg Assigned To  => ferg
09-15-08 16:25 ferg Status new => closed
09-15-08 16:25 ferg Resolution open => fixed
09-15-08 16:25 ferg Fixed in Version  => 3.2.1


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