Edit report at https://bugs.php.net/bug.php?id=60222&edit=1
ID: 60222 Updated by: il...@php.net Reported by: tyr...@php.net Summary: time_nanosleep won't throw a warning for negative second -Status: Open +Status: Closed Type: Bug Package: Scripting Engine problem Operating System: freebsd PHP Version: Irrelevant -Assigned To: +Assigned To: iliaa Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2012-03-12 16:52:58] il...@php.net Automatic comment from SVN on behalf of iliaa Revision: http://svn.php.net/viewvc/?view=revision&revision=324163 Log: Fixed bug #60222 (time_nanosleep() does validate input params). ------------------------------------------------------------------------ [2011-11-04 22:00:54] tyr...@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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60222&edit=1