|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-08-01 17:42 UTC] phpbugs at gunnu dot us
Description: ------------ /[cvs]/php-src/ext/posix/posix.c rev 1.110 line 687 detects error if 'ticks' is a negative value. POSIX.1 states -1 is an error condition, but other negative values are acceptable overflow, which can be caused by a long uptime. posix_times() returns false under these conditions when there is no error except a long uptime. Reproduce code: --------------- <?php var_dump( posix_times() ); //returns false if uptime is high enough without setting error ?> Expected result: ---------------- A populated array Actual result: -------------- bool(FALSE) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 01:00:01 2025 UTC |
--- posix.c 2009-08-01 13:55:30.000000000 -0400 +++ posix.c.fix 2009-08-01 13:56:14.000000000 -0400 @@ -684,7 +684,7 @@ PHP_POSIX_NO_ARGS; - if((ticks = times(&t)) < 0) { + if((ticks = times(&t)) == -1) { POSIX_G(last_error) = errno; RETURN_FALSE; })