]> granicus.if.org Git - php/commitdiff
- Fixed bug #49132 (posix_times returns false without error)
authorFelipe Pena <felipe@php.net>
Sat, 1 Aug 2009 18:22:31 +0000 (18:22 +0000)
committerFelipe Pena <felipe@php.net>
Sat, 1 Aug 2009 18:22:31 +0000 (18:22 +0000)
  patch by: phpbugs at gunnu dot us

NEWS
ext/posix/posix.c

diff --git a/NEWS b/NEWS
index d5c0869daba7decffce9aa23216c9e7733708971..ea9053aaa270ad15d304ba86a1dd799f58f73af0 100644 (file)
--- 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
index 7e68503ef8064024955ce1e1047a0f11c856cff1..49e91ea56ef3db41eb2ff77711b7774be478bf2f 100644 (file)
@@ -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;
        }