From da73057c2ae900e47dc412d4a9672e8ab7c0e126 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sat, 1 Aug 2009 18:22:31 +0000 Subject: [PATCH] - Fixed bug #49132 (posix_times returns false without error) patch by: phpbugs at gunnu dot us --- NEWS | 2 ++ ext/posix/posix.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d5c0869dab..ea9053aaa2 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ PHP NEWS defined as a file handle. (Ilia) - Fixed memory leak in stream_is_local(). (Felipe) +- Fixed bug #49132 (posix_times returns false without error). + (phpbugs at gunnu dot us) - Fixed bug #49074 (private class static fields can be modified by using reflection). (Jani) - Fixed bug #49052 (context option headers freed too early when using diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 7e68503ef8..49e91ea56e 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -491,7 +491,7 @@ PHP_FUNCTION(posix_times) PHP_POSIX_NO_ARGS; - if((ticks = times(&t)) < 0) { + if ((ticks = times(&t)) == -1) { POSIX_G(last_error) = errno; RETURN_FALSE; } -- 2.40.0