Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003186 [Quercus] minor always 12-16-08 23:50 12-17-08 13:21
Reporter koreth View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 4.0.0
Summary 0003186: Saved state doesn't include list of include_once files
Description state.php:

<?php
if (! resin_restore_state()) {
  include_once 'state2.php';
  resin_save_state();
}
include_once 'state2.php';

state2.php:

<?php
if (true) {
  function foo() { }
}

The second time this is loaded, it dies and says "Fatal Error: function foo() is already defined."

It looks like if that file has a straight function declaration in global scope, that doesn't cause the problem, but any actual code gets executed even though the result of the code is already part of the global state. This will probably cause lots of unwanted side effects. I think the saved state should contain the list of files that have already been included.
Additional Information
Attached Files

- Relationships

- Notes
(0003668)
nam
12-17-08 13:21

php/404j
 

- Issue History
Date Modified Username Field Change
12-16-08 23:50 koreth New Issue
12-17-08 10:04 nam Status new => assigned
12-17-08 10:04 nam Assigned To  => nam
12-17-08 13:21 nam Status assigned => closed
12-17-08 13:21 nam Note Added: 0003668
12-17-08 13:21 nam Resolution open => fixed
12-17-08 13:21 nam Fixed in Version  => 4.0.0


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