Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003402 [Quercus] minor always 03-20-09 14:11 03-20-09 18:36
Reporter koreth View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 4.0.0
Summary 0003402: exit() prints numeric exit codes to user
Description <?php
function my_exit($val=0) {
  if (time() == 0) {
    do_something_else($val);
  }
  exit($val);
}
my_exit(0);

Regular PHP and Quercus in interpreted mode print nothing. Quercus in compiled mode prints "0".

Patch:

--- a/modules/quercus/src/com/caucho/quercus/env/Env.java
+++ b/modules/quercus/src/com/caucho/quercus/env/Env.java
@@ -5244,7 +5244,7 @@ public class Env {
    */
   public Value exit(Value msg)
   {
- if (msg.isNull() || msg instanceof LongValue)
+ if (msg.isNull() || msg.isLongConvertible())
       return exit();
 
     try {
Additional Information
Attached Files

- Relationships

- Notes
(0003914)
nam
03-20-09 18:36

php/33k6
 

- Issue History
Date Modified Username Field Change
03-20-09 14:11 koreth New Issue
03-20-09 18:14 nam Status new => assigned
03-20-09 18:14 nam Assigned To  => nam
03-20-09 18:36 nam Status assigned => closed
03-20-09 18:36 nam Note Added: 0003914
03-20-09 18:36 nam Resolution open => fixed
03-20-09 18:36 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