Bug #60222 [Opn->Csd]: time_nanosleep won't throw a warning for negative second

From: Date: Mon, 12 Mar 2012 16:53:02 +0000
Subject: Bug #60222 [Opn->Csd]: time_nanosleep won't throw a warning for negative second
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-168377@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60222&edit=1 ID: 60222 Updated by: iliaa@php.net Reported by: tyrael@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] 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). ------------------------------------------------------------------------ [2011-11-04 22:00:54] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60222&edit=1

« previous php.bugs (#168377) next »