php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60222 time_nanosleep won't throw a warning for negative second
Submitted: 2011-11-04 22:00 UTC Modified: 2012-03-12 16:53 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: tyrael@php.net Assigned: iliaa (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: Irrelevant OS: freebsd
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tyrael@php.net
New email:
PHP Version: OS:

 

 [2011-11-04 22:00 UTC] tyrael@php.net
Description:
------------
time_nanosleep(-1, 0); should trigger "Warning: time_nanosleep(): nanoseconds was 
not in the range 0 to 999 999 999 or seconds was negative" but on FreeBSD 8.2 it 
will just sleep 0 sec.
this also makes ext/standard/tests/misc/time_nanosleep_error3.phpt fail on FreeBSD

Test script:
---------------
<?php
time_nanosleep(-1, 0);

Expected result:
----------------
Warning: time_nanosleep(): nanoseconds was not in the range 0 to 999 999 999 or 
seconds was negative


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-12 16:52 UTC] iliaa@php.net
Automatic comment from SVN on behalf of iliaa
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=324163
Log: Fixed bug #60222 (time_nanosleep() does validate input params).
 [2012-03-12 16:53 UTC] iliaa@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: iliaa
 [2012-03-12 16:53 UTC] iliaa@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-04-18 09:45 UTC] laruence@php.net
Automatic comment on behalf of iliaa
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7337a901b78f792ef2f18d0bf807ec505dec57f0
Log: Fixed bug #60222 (time_nanosleep() does validate input params).
 [2012-07-24 23:36 UTC] rasmus@php.net
Automatic comment on behalf of iliaa
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7337a901b78f792ef2f18d0bf807ec505dec57f0
Log: Fixed bug #60222 (time_nanosleep() does validate input params).
 [2013-11-17 09:33 UTC] laruence@php.net
Automatic comment on behalf of iliaa
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7337a901b78f792ef2f18d0bf807ec505dec57f0
Log: Fixed bug #60222 (time_nanosleep() does validate input params).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC