Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002879 [Quercus] minor always 08-28-08 23:56 09-03-08 23:47
Reporter koreth View Status public  
Assigned To nam
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 0002879: Bogus "break" causes compilation failure
Description <?php
function foo($id) {
  if ($id == 1) {
    break;
  }
  return null;
}


That's obviously a bogus "break" (and this Quercus bug uncovered a case like this in our code base) but the above fails to compile. The generated Java code has two "return" statements in a row which causes an "unreachable statement" error.

Not high priority at all; the offending PHP code can and should be fixed to not tickle this bug.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003376)
nam
09-03-08 23:47

php/3646

A break/continue inside a function, that is not enclosed by a loop/switch, is not allowed in PHP:

PHP 5.2.4: Fatal error: Cannot break/continue 1 level

Quercus will now report this parse error, instead of just executing the code.
 

- Issue History
Date Modified Username Field Change
08-28-08 23:56 koreth New Issue
09-02-08 22:04 nam Status new => assigned
09-02-08 22:04 nam Assigned To  => nam
09-03-08 23:47 nam Status assigned => closed
09-03-08 23:47 nam Note Added: 0003376
09-03-08 23:47 nam Resolution open => fixed
09-03-08 23:47 nam 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