Mantis - Quercus
Viewing Issue Advanced Details
1178 minor always 06-05-06 17:49 06-09-06 14:39
koreth  
ferg  
normal  
closed 3.0.20  
fixed  
none    
none 3.0.20  
0001178: set_time_limit() doesn't allow removing time limit
The PHP docs say "set_time_limit(0);" is supposed to remove the timeout for script execution; in Quercus this results in the time limit expiring immediately.

The fix is trivial, just adding a check for a 0 time limit in checkTimeout():

  public final void checkTimeout()
  {
    if (_timeLimit != 0) {
      long now = Alarm.getCurrentTime();

      if (_startTime + _timeLimit < now)
        throw new QuercusRuntimeException(L.l("script timed out"));
    }
  }

There are no notes attached to this issue.